Fix Anthropic custom provider Bearer authentication - #402
Conversation
Implementation PlanProblem and design
For the built-in Anthropic Messages implementation:
The model registry will continue materializing the documented Authorization header for backward compatibility with custom Deliverables
Files to modify or create
The root README, coding-agent README, and provider overview already route readers to the dedicated model/custom-provider guides without describing Acceptance criteria
Testing and validation
Risks and resolved questions
Plan created by mach6 |
Vitest coverage
|
Progress UpdateImplemented deterministic authentication for Anthropic-compatible custom providers:
Validation completed:
The live-inclusive suite was also attempted; configured ChatGPT enterprise tests reached the account usage limit. The complete credential-isolated suite is green. Commit: Progress tracked by mach6 |
Code ReviewCriticalNone. ImportantFinding 1 — Caller Authorization override is not verified on the final wireSeverity: high The Bearer-mode precedence test checks Add a real-SDK intercepted- Finding 2 — AuthStorage runtime credential precedence is not exercised end to endSeverity: high Registry tests validate load-time auth metadata and credential resolution, while the wire test directly supplies a literal Add an integration test that configures SuggestionsFinding 3 — Identical
|
Review AssessmentClassifications
Action Plan
Assessment by mach6 |
Progress UpdateFixed review findings 1 and 2:
Validation completed:
Commit: Progress tracked by mach6 |
Closes #392
Make Anthropic-compatible custom provider authentication deterministic: explicit Bearer mode sends only
Authorization, API-key mode sends onlyx-api-key, and SDK environment fallback cannot inject ambient credentials.Implementation plan posted as a comment below.