feat: expand MiniMax provider registry#762
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 336d63b6d5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| normalized_base_url = base_url.rstrip("/") | ||
| return any( | ||
| normalized_base_url == endpoint.anthropic_base_url.rstrip("/") | ||
| for endpoint in spec.endpoints |
There was a problem hiding this comment.
Normalize MiniMax Anthropic URLs before client selection
When an admin enters the full MiniMax Anthropic endpoint ending in /v1/messages (or /v1), this exact comparison returns false even though AnthropicClient._normalize_base_url() already supports those forms. The model then falls through to OpenAICompatibleClient, which appends /chat/completions and sends the wrong protocol to a URL like .../anthropic/v1/messages/chat/completions; normalize the candidate URL the same way before matching, or accept the documented full endpoint variants.
Useful? React with 👍 / 👎.
Reason: add target provider/model to existing provider registry.
Checks:
git diff --checkruff check backend/app/services/llm/client.py backend/tests/test_llm_provider_registry.pyPYTHONPATH=. pytest tests/test_llm_provider_registry.pynpm run build --prefix frontend