enhance API key provider testing with OpenAI-compatible chat completion request #757
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.
Closes #710
feat: Add provider testing and enhance templates
This PR introduces new features and improvements to the Claude Code Router:
Provider Connectivity Testing: Implemented new API endpoints (/api/test-providers and
/api/test-provider) and CLI commands (ccr test and ccr test ) to allow users to test the
connectivity and authentication of their configured LLM providers. This helps in diagnosing configuration
issues.
Enhanced Provider Templates: Added qwen_cli and gemini_cli_oauth templates to the frontend's
"Import from template" functionality, making it easier for users to configure these providers. These
templates are also prioritized to appear at the top of the list.
Improved OAuth Handling in Tests: Refactored the providerTest.ts utility to dynamically handle
OAuth-managed providers (like Qwen CLI and Gemini CLI), ensuring proper token validation and API call
formatting.
Configuration Path Correction: Fixed a minor typo in a configuration path within ui/config.json.
Removed Hardcoded Project ID: Eliminated a hardcoded private project ID from the providerTest.ts
to ensure that project configurations are strictly managed via user settings.
These changes significantly improve the usability and debuggability of the Claude Code Router for users
managing multiple LLM providers.