Skip to content

Add MiniMax provider to model resolver and debugging agent - #522

Open
octo-patch wants to merge 1 commit into
saffron-health:mainfrom
octo-patch:octo/20260730-provider-add-recvqbXypuiEKQ
Open

Add MiniMax provider to model resolver and debugging agent#522
octo-patch wants to merge 1 commit into
saffron-health:mainfrom
octo-patch:octo/20260730-provider-add-recvqbXypuiEKQ

Conversation

@octo-patch

Copy link
Copy Markdown

Reason: provider-add — Libretto's executable model resolver and browser-debugging agent omitted MiniMax.

What changed

Add the MiniMax provider to both model-resolution entry points, using MiniMax's OpenAI-compatible and Anthropic-compatible endpoints with global and China hosts. MiniMax model ids (for example MiniMax-M3) are passed straight through as provider/model-id — no model names are hardcoded.

  • packages/libretto/src/cli/core/resolve-model.ts

    • Provider type gains "minimax"; SUPPORTED_PROVIDER_ALIASES accepts minimax.
    • parseModel lists MiniMax in the supported-providers error message.
    • hasProviderCredentials checks MINIMAX_API_KEY; missingProviderCredentialsMessage returns a MiniMax-specific message.
    • getProviderModel resolves MiniMax through @ai-sdk/openai against ${host}/v1 by default, or @ai-sdk/anthropic against ${host}/anthropic when MINIMAX_API_STYLE=anthropic. The host is the global api.minimax.io unless MINIMAX_REGION is set to a China value (cn / cn_zh / china), in which case it uses api.minimaxi.com.
  • packages/playwright-debugger/src/index.ts

    • SupportedAgentProvider gains "minimax"; parseAgentModel accepts it and lists it in the supported-providers error.
    • resolveLanguageModel resolves a MiniMax model through createOpenAI (${host}/v1) by default, or createAnthropic (${host}/anthropic) when MINIMAX_API_STYLE=anthropic, with the same global/China host selection and the same agent.apiKey override convention as the existing OpenAI/Anthropic branches.
  • packages/playwright-debugger/test/debugger.spec.ts

    • parseAgentModel now parses minimax/MiniMax-M3 to { provider: "minimax", modelId: "MiniMax-M3" }.
  • docs/reference/runtime/playwright-debugger.mdx

    • Lists MiniMax as a supported provider, documents MINIMAX_API_STYLE and MINIMAX_REGION, and adds MINIMAX_API_KEY to the model-keys example.

Checks

  • packages/playwright-debugger: tsc --noEmit (type-check) passed; vitest run test/debugger.spec.ts passed (9 tests).
  • packages/libretto: tsc --noEmit (type-check) passed; vitest run test/ai-config.spec.ts test/credentials.spec.ts passed (9 tests).
  • oxlint --type-aware on the changed source files passed.

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

@octo-patch is attempting to deploy a commit to the tanishq's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant