refactor: finish canonical provider identifier audit - #1030
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe change adds shared Anthropic/OpenAI protocol constants, centralizes provider identifiers in protocol and authentication checks, and expands tests for provider-specific routing and keyless authentication behavior. ChangesProvider identifier centralization
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/shared/__tests__/checkExistApiConfig.spec.ts`:
- Around line 69-72: Update the keyless-provider tests around checkExistKey to
exercise providerIdentifiers.openaiCodex and providerIdentifiers.qwenCode in
addition to providerIdentifiers.fakeAi. Replace any hard-coded openaiCodex or
qwenCode identifiers in the nearby cases with their corresponding registry
values.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 73331000-75cf-46be-b611-189c7fe8291a
📒 Files selected for processing (6)
packages/types/src/__tests__/provider-settings.test.tspackages/types/src/provider-settings.tspackages/types/src/providers/anthropic.tspackages/types/src/providers/openai.tssrc/shared/__tests__/checkExistApiConfig.spec.tssrc/shared/checkExistApiConfig.ts
Summary
providerIdentifiersregistryCloses #960
TDD
Each migrated branch was driven by an observed red-green cycle:
Verification
cd packages/types && npx vitest run src/__tests__/provider-settings.test.ts src/__tests__/provider-identifiers.test.ts src/__tests__/provider-default-model.test.ts— 38 passedcd src && npx vitest run shared/__tests__/checkExistApiConfig.spec.ts shared/__tests__/ProfileValidator.spec.ts— 50 passedKnown unrelated environment issue
The repository pre-push type-check reaches the new Playwright visual-test files and fails because local dependencies
@playwright/experimental-ct-react,@playwright/test, andmonocart-reporterare unavailable. The types and extension packages affected by this PR type-check successfully. The local runtime is Node 24.7.0 while the repository requests Node 22.23.1.Summary by CodeRabbit