[PR #8371] fix(provider): add gpt-5.1-codex-max model to OpenRouter #12721

Open
opened 2026-02-16 18:17:37 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/8371

State: open
Merged: No


Summary

Fixes #8291

The openai/gpt-5.1-codex-max model is available on OpenRouter's API but was not included in the models.dev database, making it unavailable to OpenCode users connecting via OpenRouter.

Changes

  • Added dynamic model injection for openai/gpt-5.1-codex-max to the OpenRouter provider
  • Model is only added if the base openai/gpt-5.1-codex model exists (to ensure we have a valid API configuration to inherit from)
  • Follows the same pattern used for GitHub Copilot model handling

Model specifications:

  • Context limit: 400,000 tokens
  • Output limit: 128,000 tokens
  • Supports: reasoning, tool calls, image input
  • Pricing: $1.1/M input, $9/M output, $0.11/M cache read

Test plan

  • Verify model appears in /models when using OpenRouter provider
  • Verify model is selectable and usable for chat
  • Verify existing OpenRouter models continue to work

🤖 Generated with Claude Code

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/8371 **State:** open **Merged:** No --- ## Summary Fixes #8291 The `openai/gpt-5.1-codex-max` model is available on OpenRouter's API but was not included in the models.dev database, making it unavailable to OpenCode users connecting via OpenRouter. ## Changes - Added dynamic model injection for `openai/gpt-5.1-codex-max` to the OpenRouter provider - Model is only added if the base `openai/gpt-5.1-codex` model exists (to ensure we have a valid API configuration to inherit from) - Follows the same pattern used for GitHub Copilot model handling ### Model specifications: - Context limit: 400,000 tokens - Output limit: 128,000 tokens - Supports: reasoning, tool calls, image input - Pricing: $1.1/M input, $9/M output, $0.11/M cache read ## Test plan - [ ] Verify model appears in `/models` when using OpenRouter provider - [ ] Verify model is selectable and usable for chat - [ ] Verify existing OpenRouter models continue to work --- 🤖 Generated with [Claude Code](https://claude.com/claude-code)
yindo added the pull-request label 2026-02-16 18:17:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12721