Skip to content

fix(anthropic): omit tool-streaming beta on MiniMax endpoints#6861

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-95b15f6e
Apr 10, 2026
Merged

fix(anthropic): omit tool-streaming beta on MiniMax endpoints#6861
teknium1 merged 1 commit into
mainfrom
hermes/hermes-95b15f6e

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Salvage of #6688 by @kshitijk4poor (based on #6528 by @HiddenPuppy). Fixes #6510, #6555.

Problem

MiniMax's Anthropic-compatible endpoints (api.minimax.io/anthropic, api.minimaxi.com/anthropic) reject the fine-grained-tool-streaming-2025-05-14 beta header. Regular chat works fine, but any tool-use request triggers an ~18s timeout connection error.

Fix

Adds _common_betas_for_base_url() that filters out the tool-streaming beta for Bearer-auth (MiniMax) endpoints. All four client-construction branches in build_anthropic_client() now use the filtered list. Other betas (interleaved-thinking) are kept — MiniMax ignores unrecognized betas harmlessly.

Tests

140/140 tests pass across test_anthropic_adapter.py + test_minimax_provider.py, including 12 new tests covering both MiniMax domains, trailing slashes, non-MiniMax keeps full betas, and direct _common_betas_for_base_url() unit tests.

MiniMax's Anthropic-compatible endpoints reject requests that include
the fine-grained-tool-streaming beta header — every tool-use message
triggers a connection error (~18s timeout). Regular chat works fine.

Add _common_betas_for_base_url() that filters out the tool-streaming
beta for Bearer-auth (MiniMax) endpoints while keeping all other betas.
All four client-construction branches now use the filtered list.

Based on #6528 by @HiddenPuppy.
Original cherry-picked from PR #6688 by kshitijk4poor.
Fixes #6510, fixes #6555.
@teknium1 teknium1 merged commit 08e2a1a into main Apr 10, 2026
3 of 4 checks passed
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.

v0.8.0 MiniMax gateway connection error on any message requiring tool use

2 participants