Skip to content

fix(providers): treat non-credential HTTP failures from Claude models.list() as inconclusive - #457

Merged
Jason Robert (jrob5756) merged 3 commits into
mainfrom
fix/455-validate-connection-azure-foundry
Aug 18, 2026
Merged

fix(providers): treat non-credential HTTP failures from Claude models.list() as inconclusive#457
Jason Robert (jrob5756) merged 3 commits into
mainfrom
fix/455-validate-connection-azure-foundry

Conversation

@jrob5756

Copy link
Copy Markdown
Collaborator

Summary

Azure AI Foundry and some LiteLLM/Databricks gateways answer models.list() with a 404 while /v1/messages works fine, causing validate_connection() to fail startup even though the endpoint is usable. This treats a non-credential, non-connection HTTP failure from that probe as inconclusive instead of fatal: the workflow proceeds and credentials are verified at the first agent execution.

  • Unreachable host, rejected credentials (401/403), or a non-HTTP error still fail startup.
  • Any other HTTP status now warns and continues.

Closes#455

Jason Robertand others added 2 commits August 17, 2026 18:28
….list() as inconclusive
Azure AI Foundry and some LiteLLM/Databricks gateways answer models.list()
with a 404 while /v1/messages works fine, causing validate_connection() to
fail startup even though the endpoint is usable. Classify a models.list()
failure via _connection_probe_verdict: an unreachable host, rejected
credentials (401/403), or a non-HTTP error still fails startup, but any
other HTTP status is now treated as inconclusive so the workflow proceeds
and credentials are verified at the first agent execution instead.
… of hiding them
Addresses PR #457 review findings:
- claude.py: narrow the duck-typed status_code to int (excluding bool)
before the 401/403 check, so a stringified or Mock-shaped status no
longer fails open and boots a workflow with rejected credentials.
- claude.py: record an inconclusive models.list() probe on the instance
(_connection_probe_note) and short-circuit get_max_prompt_tokens()/
list_models() once model listing is known unavailable
(_model_listing_unavailable), instead of re-attempting a
guaranteed-failing round-trip on every agent step.
- diagnostics.py: add ProviderDiagnostic.connection_note, populate it from
the new instance attribute, and gate the doctor --models list_models()
call on a verified (not merely truthy) connection.
- doctor.py + fleet/tui/screens/providers.py: render a distinct "unverified"
state instead of a false "connected" checkmark when the probe never
actually verified the endpoint.
- docs/providers/claude.md: correct the probe attribution — it's
`conductor run` (via provider construction) and `conductor doctor
--check`/`--models` that probe the endpoint; `conductor validate` never
constructs a provider or contacts the network.
- tests: add coverage for a stringified and a directly-attached duck-typed
status code, both asserting the credential-rejection path still fails
closed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jrob5756
Jason Robert (jrob5756) marked this pull request as ready for review August 17, 2026 22:55
…ection-azure-foundry
# Conflicts:
#	CHANGELOG.md
@jrob5756
Jason Robert (jrob5756) merged commit 02b9dff into mainAug 18, 2026
24 of 25 checks passed
@jrob5756
Jason Robert (jrob5756) deleted the fix/455-validate-connection-azure-foundry branch August 18, 2026 16:14
Sign up for freeto 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.

bug(claude): validate_connection fails on Azure AI Foundry -- models.list() not supported

1 participant

@jrob5756