Files
CLIProxyAPI/sdk/cliproxy
hkfires c675cf5e72 refactor(config): Implement reconciliation for providers and clients
This commit introduces a reconciliation mechanism for handling configuration updates, significantly improving efficiency and resource management.

Previously, reloading the configuration would tear down and recreate all access providers from scratch, regardless of whether their individual configurations had changed. This was inefficient and could disrupt services.

The new `sdkaccess.ReconcileProviders` function now compares the old and new configurations to intelligently manage the provider lifecycle:
- Unchanged providers are kept.
- New providers are created.
- Providers removed from the config are closed and discarded.
- Providers with updated configurations are gracefully closed and recreated.

To support this, a `Close()` method has been added to the `Provider` interface.

A similar reconciliation logic has been applied to the client registration state in `state.RegisterClient`. This ensures that model registrations are accurately tracked when a client's configuration is updated, correctly handling added, removed, and unchanged models. Enhanced logging provides visibility into these operations.
2025-09-26 18:32:47 +08:00
..
2025-09-25 10:32:48 +08:00
2025-09-25 10:32:48 +08:00
2025-09-25 10:32:48 +08:00
2025-09-25 10:32:48 +08:00
2025-09-25 10:32:48 +08:00
2025-09-25 10:32:48 +08:00
2025-09-25 10:32:48 +08:00
2025-09-25 10:32:48 +08:00