Skip to content

OpenCode Claude runs fail through TokenRouter and direct Anthropic model ID #426

Description

@ChathurangiShyalika

Description

While evaluating opencode_agent on the scenario suite, Claude Opus 4.6 fails before completing scenario 1. I tested both TokenRouter and direct Anthropic model IDs.

Reproduction

TokenRouter Claude

uv run python -m benchmark.scenario_suite_runner \
  --scenario-ids benchmarks/scenario_suite/scenarios.txt \
  --scenario-root /../scenarios_data \
  --agent_name opencode_agent \
  --model-id tokenrouter/anthropic/claude-opus-4.6 \
  --opencode-workspace-root traces/opencode_workspaces \
  --opencode-allow-files \
  --opencode-allow-bash \
  --opencode-thinking

Failure:

APIError: messages: text content blocks must be non-empty
statusCode: 400
url: https://api.tokenrouter.com/v1/chat/completions

The run starts successfully, calls tools, then fails during the next model call after tool use.

Direct Anthropic Claude

  --scenario-ids benchmarks/scenario_suite/scenarios.txt \
  --scenario-root /.../scenarios_data \
  --agent_name opencode_agent \
  --model-id anthropic/claude-opus-4.6 \
  --opencode-workspace-root traces/opencode_workspaces \
  --opencode-allow-files \
  --opencode-allow-bash \
  --opencode-thinking

Failure:

Model not found: anthropic/claude-opus-4.6
Did you mean: claude-opus-4-0, claude-opus-4-1, claude-opus-4-1-20250805?

Expected Behavior

Claude should run through opencode_agent like other TokenRouter models and produce a trajectory/report for scenario evaluation.

Actual Behavior

tokenrouter/anthropic/claude-opus-4.6 fails with Anthropic message validation error.
anthropic/claude-opus-4.6 fails because OpenCode does not recognize that direct model ID.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

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