Skip to content

Fix third-party Anthropic provider connection tests#575

Open
Linlearner wants to merge 1 commit into
op7418:mainfrom
Linlearner:fix/thirdparty-provider-test-model
Open

Fix third-party Anthropic provider connection tests#575
Linlearner wants to merge 1 commit into
op7418:mainfrom
Linlearner:fix/thirdparty-provider-test-model

Conversation

@Linlearner
Copy link
Copy Markdown

Summary\n- Use the user-entered model mapping when testing Anthropic third-party providers, instead of always falling back to short aliases like sonnet.\n- Classify HTTP 503 / temporarily unavailable provider responses explicitly, so the UI no longer shows the generic "unexpected error" message.\n- Add regression coverage for model-mapping connection tests and 503 classification.\n\n## Verification\n- npx --yes tsx --test src/__tests__/unit/provider-key-lifecycle.test.ts src/__tests__/unit/error-classifier.test.ts\n- git diff --cached --check\n\n## Notes\n- npm ci currently fails because package.json and package-lock.json are out of sync on main (missing @electron/windows-sign transitive entries), so I used temporary npx runners for the focused tests.\n- Full tsc --noEmit could not complete without the project dependency tree installed; the failure was missing dependencies/types, not this patch.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

Someone is attempting to deploy a commit to the op7418's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Linlearner
Copy link
Copy Markdown
Author

Linlearner commented Jun 1, 2026

Additional verification after review:

  • The connection-test path now sends the user-entered model mapping (for example a full Claude model ID) instead of falling back to the short alias sonnet. This is the functional fix for third-party Anthropic-compatible providers that reject short aliases.
  • The normal runtime path already resolves short aliases through role model mappings; this patch closes the missing connection-test path.
  • Focused regression tests pass: npx --yes tsx --test src/__tests__/unit/provider-key-lifecycle.test.ts src/__tests__/unit/error-classifier.test.ts.
  • Current Vercel failure is fork deployment authorization, not a test/build failure.

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.

1 participant