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 👍 / 👎.
Strip trailing /v1/messages and /v1 suffixes before matching configured Anthropic endpoints, so admin-entered full endpoint variants route to AnthropicClient instead of falling through to OpenAICompatibleClient.
|
Thanks for the review. I normalized the MiniMax Anthropic base URL before endpoint matching in |
Use the configured MiniMax-M3 price (0.6/2.4/0.12 per M tokens) as the base pricing and drop the unused pricing_tiers field so the registry and manifest match the target provider config.
|
Aligned the MiniMax-M3 registry pricing with the target provider config (input 0.6 / output 2.4 / cache_read 0.12 USD per million tokens) and removed the unused |
|
Updated the PR branch with the latest main to resolve the merge conflict in the LLM settings UI, while keeping the MiniMax provider changes limited to the provider registry, registry tests, and LLM settings provider hints. I ran |
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