Skip to content

fix(acp): populate full model list from provider cache on startup#1001

Merged
bug-ops merged 5 commits intomainfrom
fix/acp-model-list-warm-cache
Feb 27, 2026
Merged

fix(acp): populate full model list from provider cache on startup#1001
bug-ops merged 5 commits intomainfrom
fix/acp-model-list-warm-cache

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 27, 2026

Summary

  • discover_models_from_config now reads the on-disk ModelCache for each configured provider; when the cache is warm the full remote model list is returned instead of the single config fallback
  • Added orchestrator support: when llm.provider = "orchestrator", the function iterates over llm.orchestrator.providers entries instead of the top-level llm.model field
  • Added warm_model_caches which runs at ACP server startup with a 5-second timeout, calls list_models_remote() on the active provider to populate the cache, then expands acp_available_models in-place for that provider slug
  • Applied to both run_acp_server (stdio) and run_acp_http_server transports

Test plan

  • Build with --features acp and start zeph with cloud.toml (orchestrator config)
  • Verify ACP model dropdown shows ollama:qwen3:8b and claude:claude-sonnet-4-5-20250929 instead of the wrong ollama:claude-sonnet-4-5-20250929
  • Run /model refresh and confirm full Ollama model list appears in dropdown
  • Verify cargo nextest run --workspace --lib --bins passes (2942 tests)

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.
@github-actions github-actions bot added bug Something isn't working size/M labels Feb 27, 2026
@github-actions github-actions bot added the rust label Feb 27, 2026
@github-actions github-actions bot added the llm LLM provider related label Feb 27, 2026
@bug-ops bug-ops enabled auto-merge (squash) February 27, 2026 00:23
@github-actions github-actions bot added the core label Feb 27, 2026
@bug-ops bug-ops merged commit 1329420 into main Feb 27, 2026
25 checks passed
@bug-ops bug-ops deleted the fix/acp-model-list-warm-cache branch February 27, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core llm LLM provider related rust size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant