fix: report the server's AI providers in doctor, and stop hardcoding models - #120
Open
ambiorix2099 wants to merge 2 commits into
Open
fix: report the server's AI providers in doctor, and stop hardcoding models#120ambiorix2099 wants to merge 2 commits into
ambiorix2099 wants to merge 2 commits into
Conversation
doctor's AI Providers section read only the local shell's environment. Agents execute on the server, which resolves provider credentials from its own configuration, so a shell without keys reported zero providers configured against a server that had several — while printing the server URL directly above the list. doctor now asks the server for provider status and reports that alongside the local environment check, which still governs the deploy and worker paths. A host-managed deployment and a server without the endpoint are both stated plainly and neither counts as a warning; the lookup is bounded so an unreachable server is a finding rather than a hang. The per-provider model lists are gone with it. The endpoint reports which providers are configured but carries no model names, and a hardcoded list cannot stay true: two of the Anthropic ids doctor advertised had already been withdrawn, and copying one produced a failed execution on the server rather than a validation error. Refs #117 Refs #103 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
agent init wrote a fixed OpenAI model into every generated config regardless of what was configured, then printed a run command that could not succeed without an OpenAI key. The failure landed server-side at execution time as a FAILED workflow rather than a validation error, which is an expensive way to learn the model was never usable. There is no better default to pick. The server reports which providers it can dial but carries no model names, so any built-in choice is a guess a CLI release cannot keep true — the same drift that left doctor advertising two withdrawn Anthropic ids. init now requires --model, and when it is missing it names the providers the server reports as configured. That lookup is a courtesy, not a precondition: it is bounded, and init still scaffolds a config with no server reachable at all. Provisional pending team discussion of the first-run experience, and kept as a single commit so it can be reverted on its own. Refs #103 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ambiorix2099
marked this pull request as ready for review
August 13, 2026 21:17
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.
doctor's AI Providers section read only the local shell. Agents run on the server, which dials providers from its own config, so a shell with no keys reported zero providers against a server that had five — with the server URL printed right above the list.Two commits:
Report the server's providers (
/api/providers/status) alongside the local check, and drop the hardcoded model lists. The endpoint reports providers but no model names, and the list had already drifted — two of the Anthropic ids it advertised return 404. Host-managed deployments and servers without the endpoint are both reported plainly, neither as an error.agent initrequires--modelinstead of writingopenai/gpt-4ointo every config regardless of what's configured. This one is a judgment call rather than a clear fix, so it is a separate commit and reverts cleanly on its own. Opinions welcome on the commit itself.One note for whoever looks at the server:
/api/providers/statustakes 7–8s on a local OSS server, which forced a generous client timeout. It isn't the ollama probe — a refused connect returns instantly.Tests: unit tests for all three endpoint responses and the
initerror paths; the skippeddoctor.batsguard for #103 is unskipped and passing;bats tier:prgreen fordoctor.batsandagent.bats.Closes #117
Part of #103