fix(acp): populate full model list from provider cache on startup#1001
Merged
fix(acp): populate full model list from provider cache on startup#1001
Conversation
discover_models_from_config now reads the on-disk ModelCache for each configured provider (Ollama, Claude, OpenAI, compatible). When the cache is warm (< 24 h old) the full remote model listing is used instead of the single model from config, giving the ACP client a complete selection list. warm_model_caches is called during run_acp_server and run_acp_http_server startup with a 5-second timeout. It fetches the current provider's model list, populates the cache, then expands acp_available_models in-place for that provider slug. First-run fallback remains the single config model.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
discover_models_from_confignow reads the on-diskModelCachefor each configured provider; when the cache is warm the full remote model list is returned instead of the single config fallbackllm.provider = "orchestrator", the function iterates overllm.orchestrator.providersentries instead of the top-levelllm.modelfieldwarm_model_cacheswhich runs at ACP server startup with a 5-second timeout, callslist_models_remote()on the active provider to populate the cache, then expandsacp_available_modelsin-place for that provider slugrun_acp_server(stdio) andrun_acp_http_servertransportsTest plan
--features acpand start zeph withcloud.toml(orchestrator config)ollama:qwen3:8bandclaude:claude-sonnet-4-5-20250929instead of the wrongollama:claude-sonnet-4-5-20250929/model refreshand confirm full Ollama model list appears in dropdowncargo nextest run --workspace --lib --binspasses (2942 tests)