Skip to content

feature: add MiniMax provider and ChatGPT 5.4 xhigh support#2499

Closed
jaivial wants to merge 4 commits into
tailcallhq:mainfrom
jaivial:feature/minimax-provider
Closed

feature: add MiniMax provider and ChatGPT 5.4 xhigh support#2499
jaivial wants to merge 4 commits into
tailcallhq:mainfrom
jaivial:feature/minimax-provider

Conversation

@jaivial

@jaivial jaivial commented Mar 7, 2026

Copy link
Copy Markdown

Summary

Add MiniMax provider support and extend GPT-5.4 reasoning support with the new chatgpt-5.4-xhigh model and xhigh effort handling.

Context

This branch already introduced MiniMax provider support, and this follow-up also adds compatibility for the new ChatGPT 5.4 highest-effort reasoning tier. Upstream meanwhile updated GPT-5.4 model metadata and Codex verbosity handling, so this branch now rebases cleanly on top of those changes and preserves the new xhigh effort semantics.

Changes

  • add MiniMax as a built-in provider and include MiniMax model definitions in the provider catalog
  • add chatgpt-5.4-xhigh to the OpenAI model catalog
  • extend the domain Effort enum and conversation persistence with xhigh
  • map xhigh through OpenAI-compatible request transformation and Responses API conversion
  • preserve explicit xhigh reasoning effort in the Codex transformer instead of downgrading it
  • keep the rebased branch compatible with upstream GPT-5.4 model catalog and Codex transformer updates

Key Implementation Details

MiniMax remains registered through the built-in provider list and provider catalog configuration. The new reasoning level is represented as Effort::Xhigh, serialized as lowercase xhigh, persisted in conversation records, and translated to async-openai via ReasoningEffort::Xhigh. In the Codex request transformer, explicit xhigh is preserved while other effort values still normalize to High and summary continues to normalize to Auto.

Use Cases

  • select MiniMax directly as a configured Forge provider
  • run ChatGPT 5.4 using the new chatgpt-5.4-xhigh model id
  • configure agents and requests with reasoning.effort: xhigh for maximum reasoning intensity
  • preserve that explicit highest-effort setting in Codex-backed flows

Testing

cargo test -p forge_domain test_effort_xhigh_serializes_as_lowercase
cargo test -p forge_app test_reasoning_with_effort_xhigh
cargo test -p forge_repo test_reasoning_config_conversion_with_xhigh_effort
cargo test -p forge_repo test_codex_transformer_preserves_xhigh_reasoning_effort

Links

- Add MINIMAX provider ID constant

- Add MiniMax provider config with Anthropic-compatible endpoint

- Add minimax_preflight.sh for API testing

- Support MiniMax-M2.5, M2.5-highspeed, M2.1, M2.1-highspeed models
@CLAassistant

CLAassistant commented Mar 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Mar 7, 2026
@@ -0,0 +1,131 @@
#!/usr/bin/env bash

@ssddOnTop ssddOnTop Mar 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this file

Comment on lines +27 to +44
"auth_methods": ["api_key"]
},
{
"id": "minimax",
"api_key_vars": "MINIMAX_API_KEY",
"url_param_vars": [],
"response_type": "Anthropic",
"url": "https://api.minimax.io/anthropic/v1/messages",
"models": [
{
"oauth_device": {
"auth_url": "https://github.com/login/device/code",
"token_url": "https://github.com/login/oauth/access_token",
"client_id": "Iv1.b507a08c87ecfe98",
"scopes": ["read:user"],
"use_pkce": false,
"token_refresh_url": "https://api.github.com/copilot_internal/v2/token",
"custom_headers": {
"User-Agent": "GitHubCopilotChat/0.26.7",
"Accept": "application/json",
"editor-version": "vscode/1.99.3",
"editor-plugin-version": "copilot-chat/0.26.7"
}
}
"id": "MiniMax-M2",
"name": "MiniMax M2",
"description": "MiniMax M2 agentic model with advanced reasoning",
"context_length": 204800,
"tools_supported": true,
"supports_parallel_tool_calls": true,
"supports_reasoning": true,
"input_modalities": ["text"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical: GitHub Copilot OAuth authentication removed

The GitHub Copilot provider's OAuth device flow configuration has been completely deleted and replaced with just ["api_key"]. This change:

  1. Removes the entire oauth_device authentication method including auth URLs, client ID, scopes, and custom headers
  2. Was not mentioned in the PR description (which only discusses adding MiniMax support)
  3. Will break authentication for all users relying on GitHub Copilot's OAuth device flow

Fix: Restore the GitHub Copilot OAuth configuration. The intended change should only add the MiniMax provider block after the GitHub Copilot provider, not modify it:

"auth_methods": [
  {
    "oauth_device": {
      "auth_url": "https://github.com/login/device/code",
      "token_url": "https://github.com/login/oauth/access_token",
      "client_id": "Iv1.b507a08c87ecfe98",
      "scopes": ["read:user"],
      "use_pkce": false,
      "token_refresh_url": "https://api.github.com/copilot_internal/v2/token",
      "custom_headers": {
        "User-Agent": "GitHubCopilotChat/0.26.7",
        "Accept": "application/json",
        "editor-version": "vscode/1.99.3",
        "editor-plugin-version": "copilot-chat/0.26.7"
      }
    }
  }
]
Suggested change
"auth_methods": ["api_key"]
},
{
"id": "minimax",
"api_key_vars": "MINIMAX_API_KEY",
"url_param_vars": [],
"response_type": "Anthropic",
"url": "https://api.minimax.io/anthropic/v1/messages",
"models": [
{
"oauth_device": {
"auth_url": "https://github.com/login/device/code",
"token_url": "https://github.com/login/oauth/access_token",
"client_id": "Iv1.b507a08c87ecfe98",
"scopes": ["read:user"],
"use_pkce": false,
"token_refresh_url": "https://api.github.com/copilot_internal/v2/token",
"custom_headers": {
"User-Agent": "GitHubCopilotChat/0.26.7",
"Accept": "application/json",
"editor-version": "vscode/1.99.3",
"editor-plugin-version": "copilot-chat/0.26.7"
}
}
"id": "MiniMax-M2",
"name": "MiniMax M2",
"description": "MiniMax M2 agentic model with advanced reasoning",
"context_length": 204800,
"tools_supported": true,
"supports_parallel_tool_calls": true,
"supports_reasoning": true,
"input_modalities": ["text"]
"auth_methods": [
{
"oauth_device": {
"auth_url": "https://github.com/login/device/code",
"token_url": "https://github.com/login/oauth/access_token",
"client_id": "Iv1.b507a08c87ecfe98",
"scopes": ["read:user"],
"use_pkce": false,
"token_refresh_url": "https://api.github.com/copilot_internal/v2/token",
"custom_headers": {
"User-Agent": "GitHubCopilotChat/0.26.7",
"Accept": "application/json",
"editor-version": "vscode/1.99.3",
"editor-plugin-version": "copilot-chat/0.26.7"
}
}
}
]
},
{
"id": "minimax",
"api_key_vars": "MINIMAX_API_KEY",
"url_param_vars": [],
"response_type": "Anthropic",
"url": "https://api.minimax.io/anthropic/v1/messages",
"models": [
{
"id": "MiniMax-M2",
"name": "MiniMax M2",
"description": "MiniMax M2 agentic model with advanced reasoning",
"context_length": 204800,
"tools_supported": true,
"supports_parallel_tool_calls": true,
"supports_reasoning": true,
"input_modalities": ["text"]

Spotted by Graphite

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@jaivial jaivial changed the title feat: Add MiniMax provider support feature: add MiniMax provider and ChatGPT 5.4 xhigh support Mar 8, 2026
"url": "https://api.githubcopilot.com/chat/completions",
"models": "https://api.githubcopilot.com/models",
"auth_methods": [
"auth_methods": ["api_key"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is wrong githubcopilot should not change in adding another provider

@ssddOnTop

Copy link
Copy Markdown
Contributor

Closing this in favor of #2557

@ssddOnTop ssddOnTop closed this Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants