Skip to content

[Bug] OpenCode Go MiniMax M2.5/M2.7 return empty content or Missing API Key error #20176

@elsatheassist-crypto

Description

@elsatheassist-crypto

Description

When using OpenCode Go provider with MiniMax M2.5 or M2.7 models, API requests fail with either empty content or "Missing API Key" error, depending on the endpoint used. The same API key works fine with Kimi K2.5 and GLM-5 on OpenCode Go.

Environment

  • OpenCode Go API key (verified working with Kimi K2.5)
  • Provider: OpenCode Go
  • Models tested: MiniMax M2.5, MiniMax M2.7

Endpoints Tested

1. /v1/chat/completions (OpenAI-compatible)

MiniMax M2.5 & M2.7: HTTP 200, but message.content is empty/null. finish_reason is "length" (indicating tokens were generated but content was not captured). Model returned: MiniMax-M2.5-highspeed for M2.5, MiniMax-M2.7 for M2.7.

Working reference - Kimi K2.5: Same request format, returns visible content correctly.

2. /v1/messages (Anthropic-compatible)

MiniMax M2.5 & M2.7: Returns {"error": {"type": "AuthError", "message": "Missing API key."}}

Same API key with Kimi K2.5 on /v1/chat/completions: Works fine.

Related Issues

Hypothesis

  1. OpenAI endpoint: MiniMax puts reasoning content in </think> tags within content instead of reasoning_content field (MiniMax-M2 reasoning content not properly handled in OpenAI-compatible mode, should we support this ? #3555). OpenCode doesn't parse this, causing empty visible output.

  2. Anthropic endpoint: MiniMax expects ANTHROPIC_AUTH_TOKEN header (not Authorization: Bearer) for auth. OpenCode Go doesn't translate the API key correctly for this endpoint.

Expected Behavior

MiniMax M2.5 and M2.7 should return visible content through OpenCode Go, like Kimi K2.5 and GLM-5 do.

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions