Skip to content

fix: report the server's AI providers in doctor, and stop hardcoding models - #120

Open
ambiorix2099 wants to merge 2 commits into
mainfrom
fix/doctor-server-providers
Open

fix: report the server's AI providers in doctor, and stop hardcoding models#120
ambiorix2099 wants to merge 2 commits into
mainfrom
fix/doctor-server-providers

Conversation

@ambiorix2099

@ambiorix2099 ambiorix2099 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

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:

  1. 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.

  2. agent init requires --model instead of writing openai/gpt-4o into 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/status takes 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 init error paths; the skipped doctor.bats guard for #103 is unskipped and passing; bats tier:pr green for doctor.bats and agent.bats.

Closes #117
Part of #103

ambiorix2099 and others added 2 commits August 13, 2026 12:39
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
ambiorix2099 marked this pull request as ready for review August 13, 2026 21:17
@ambiorix2099
ambiorix2099 requested a review from mp-orkes August 14, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doctor: also report the server's providers (/api/providers/status), not just local env

1 participant