You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default (offline) conductor doctor output made the copilot provider look unconfigured/not-ready even when fully authenticated. Every credential env var rendered as a red ✗ with an empty Notes column, so new users reasonably read it as "copilot is broken." In reality copilot authenticates via the GitHub/Copilot CLI login on disk, so those env vars are optional overrides — a fact documented only in a code comment that never reached the rendered report.
Fix
Combines options (1) and (2) from the issue — the principled version:
Model credential optionality per provider. New _CredentialSpec (env_vars / optional / note) replaces the bare env-var tuple map in diagnostics.py. ProviderDiagnostic gains a credentials_optional field (serialized in --json).
Render optional creds neutrally. In doctor.py, an absent credential for an optional-auth provider renders as a neutral dim ○ (not red ✗), and the provider's auth-path note surfaces in the Notes column. Present creds still show ✓; genuinely required creds (claude / direct Anthropic API) keep the ✗ so real misconfigurations stay visible.
claude-agent-sdk gets the same treatment for parity — it delegates to the claude CLI (claude login), so its ANTHROPIC_API_KEY is likewise an optional override.
Before / After (no credential env vars set)
Before — every copilot row is red ✗, Notes empty (looks broken):
│ copilot │ ✓ │ stable │ ✗ GITHUB_TOKEN ... │ — │
After — neutral ○ + explanatory note:
│ copilot │ ✓ │ stable │ ○ GITHUB_TOKEN ... │ authenticates via GitHub/Copilot CLI login; env vars are optional overrides │
│ claude │ ✓ │ stable │ ✗ ANTHROPIC_API_KEY ... │ — │
The offline `conductor doctor` view rendered every absent credential env
var as a red ✗, so copilot looked unconfigured even though it
authenticates via the GitHub/Copilot CLI login on disk. New users read the
all-✗ credentials cell as "copilot is broken."
Model credential optionality per provider (`_CredentialSpec`) and expose
`ProviderDiagnostic.credentials_optional`. Absent *optional* credentials now
render as a neutral dim ○ (not red ✗) with an explanatory note in the Notes
column ("authenticates via ... CLI login; env vars optional"). Required
credentials (claude / direct Anthropic API) keep the ✗ so real
misconfigurations stay visible. claude-agent-sdk gets the same treatment for
parity — it authenticates via `claude login`, so its ANTHROPIC_API_KEY is
likewise an optional override.
- diagnostics.py: `_CredentialSpec` (env_vars/optional/note),
`_CREDENTIAL_SPECS`, `credentials_optional` field + JSON key, auth note
- doctor.py: neutral ○ marker for an absent optional credential
- docs/cli-reference.md: document optional vs required credentials + --check
- tests: diagnostics optionality/note; render ○ vs ✗
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Recommendations:
- Collapse _CredentialSpec's `optional: bool` + `note: str | None` into a
single `optional_auth_note: str | None` field so the pairing can't drift
apart; `optional` becomes a derived property. Makes the illegal
"optional=True, note=None" state unrepresentable.
- Add a test for the null-object fallback (_CREDENTIAL_SPECS.get(name,
_CredentialSpec())) with an unregistered provider name — never raises.
- Add an end-to-end `doctor --json` test asserting `credentials_optional`
survives the full report -> to_dict -> print_json round trip.
- Generalize the docs' `--check` caveat: the offline view never validates
credential *values* for any provider, not just CLI-login ones.
Nits:
- Resolve the provider's _CredentialSpec once in gather_provider and pass
it into _credential_env_vars, instead of looking the name up twice.
- Add a one-line comment explaining why "not yet implemented" always wins
over a provider's own credential note.
- Add the missing `openai-agents` row to the credential-detection table.
- Tighten the substring assertion for the auth note to the exact string.
- Add a symmetric to_dict() test for a required provider's
credentials_optional: False.
Verified: ruff format/lint clean, ty typecheck clean (1 pre-existing
unrelated warning in dialog_evaluator.py), 1241 passed / 11 skipped across
tests/test_cli + tests/test_providers, and re-eyeballed the live
`conductor doctor providers` render (unchanged from before this cleanup).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
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.
Fixes#319.
Problem
The default (offline)
conductor doctoroutput made the copilot provider look unconfigured/not-ready even when fully authenticated. Every credential env var rendered as a red ✗ with an empty Notes column, so new users reasonably read it as "copilot is broken." In reality copilot authenticates via the GitHub/Copilot CLI login on disk, so those env vars are optional overrides — a fact documented only in a code comment that never reached the rendered report.Fix
Combines options (1) and (2) from the issue — the principled version:
_CredentialSpec(env_vars/optional/note) replaces the bare env-var tuple map indiagnostics.py.ProviderDiagnosticgains acredentials_optionalfield (serialized in--json).doctor.py, an absent credential for an optional-auth provider renders as a neutral dim○(not red✗), and the provider's auth-path note surfaces in the Notes column. Present creds still show✓; genuinely required creds (claude / direct Anthropic API) keep the✗so real misconfigurations stay visible.claude-agent-sdkgets the same treatment for parity — it delegates to theclaudeCLI (claude login), so itsANTHROPIC_API_KEYis likewise an optional override.Before / After (no credential env vars set)
Before — every copilot row is red ✗, Notes empty (looks broken):
After — neutral ○ + explanatory note:
Changes
src/conductor/providers/diagnostics.py—_CredentialSpec,_CREDENTIAL_SPECS,ProviderDiagnostic.credentials_optional(+ JSON key), auth notessrc/conductor/cli/doctor.py— neutral○marker for absent optional credentialsdocs/cli-reference.md— document optional vs required credentials and the--checkreadiness hint○vs✗Verification
make format/make lint— cleanmake typecheck— clean (1 pre-existing unrelateddialog_evaluator.pywarning)tests/test_cli/+tests/test_providers/test_diagnostics.py— 511 passed, 3 skippedconductor doctor providerswith all credential env vars unsetNote / secret safety
Unchanged: only credential env-var presence is ever reported — values are never read or printed.