Skip to content

Comments

Fix MiniMax fallback routing#84

Open
Marenz wants to merge 2 commits intospacedriveapp:mainfrom
Marenz:pr/fix-oauth-minimax
Open

Fix MiniMax fallback routing#84
Marenz wants to merge 2 commits intospacedriveapp:mainfrom
Marenz:pr/fix-oauth-minimax

Conversation

@Marenz
Copy link
Contributor

@Marenz Marenz commented Feb 20, 2026

MiniMax was configured as ApiType::Anthropic with base_url: api.minimax.io/anthropic, but build_anthropic_request hardcodes api.anthropic.com/v1/messages. MiniMax requests were sent to Anthropic's API with a MiniMax key, producing invalid x-api-key.

Fix: switch MiniMax to ApiType::OpenAiCompletions with base_url: api.minimax.io — their OpenAI-compatible endpoint works correctly.

Also upgrades the empty-response log from debug! to warn! for better observability.

@Marenz Marenz force-pushed the pr/fix-oauth-minimax branch 2 times, most recently from 28e9916 to 908bbb7 Compare February 21, 2026 01:24
@Marenz Marenz force-pushed the pr/fix-oauth-minimax branch from 908bbb7 to 65093c5 Compare February 21, 2026 10:35
@Marenz Marenz changed the title Fix OAuth auth and MiniMax fallback routing Fix MiniMax fallback routing Feb 21, 2026
@Marenz
Copy link
Contributor Author

Marenz commented Feb 21, 2026

Dropped the OAuth workaround commit — #100 solves that more cleanly at the LlmManager level. This PR now only contains the MiniMax routing fix and the warn-level log upgrade.

MiniMax was configured as ApiType::Anthropic, but build_anthropic_request
hardcodes api.anthropic.com. Requests were sent to Anthropic with a
MiniMax key, producing 401 invalid x-api-key.

Switch to ApiType::OpenAiCompletions with base_url api.minimax.io —
their OpenAI-compatible endpoint works correctly.
The debug log for empty assistant_content was invisible at default log
level. Upgrade to warn so we can see stop_reason and raw content when
the API returns an empty content array.
@Marenz Marenz force-pushed the pr/fix-oauth-minimax branch from 65093c5 to fcfe290 Compare February 22, 2026 00:04
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