Skip to content

feat: add MiniMax provider support#2207

Open
octo-patch wants to merge 1 commit intoopenops-cloud:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax provider support#2207
octo-patch wants to merge 1 commit intoopenops-cloud:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

  • Add MiniMax as a new AI provider using the OpenAI-compatible API
  • Add MiniMax-M2.7 and MiniMax-M2.7-highspeed models to the provider's model list
  • Register the new provider in AiProviderEnum and PROVIDER_MAP
  • Add unit tests for the new provider

Implementation Details

MiniMax exposes an OpenAI-compatible chat API at https://api.minimax.io/v1. This PR implements a dedicated MiniMax provider using @ai-sdk/openai-compatible (already a project dependency), following the same pattern as other providers in this codebase.

Users can configure MiniMax by setting:

  • Provider: MiniMax
  • API Key: MINIMAX_API_KEY
  • Model: MiniMax-M2.7 (flagship) or MiniMax-M2.7-highspeed (faster variant)

API Reference

Test plan

  • Unit tests updated and passing (packages/openops/test/ai/providers.test.ts)
  • Integration test verified — real API call to api.minimax.io returns valid response
  • Provider registered in AiProviderEnum and PROVIDER_MAP
  • Models list includes MiniMax-M2.7 and MiniMax-M2.7-highspeed

- Add MiniMax chat model provider using OpenAI-compatible API
- Add MINIMAX enum to AiProviderEnum
- Register minimax provider in PROVIDER_MAP
- Add MiniMax-M2.7 and MiniMax-M2.7-highspeed model support
- Add unit tests for the new provider
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 8, 2026

@alexandrudanpop
Copy link
Copy Markdown
Contributor

Thanks for the contribution, @octo-patch !

I can see this issue when testing it in the main chat, you can try a prompt like:
What are my available tables?

Looks related to generating JSON output from our query router. Could you please check?

 AI SDK Warning (minimax.chat / MiniMax-M2.7): The feature "responseFormat" is not supported. JSON response format schema is only supported with structuredOutputs
[API]
[API] [07:43:23 UTC] ERROR: Failed to generate chat name
[API]     errorStack: "AI_NoObjectGeneratedError: No object generated: could not parse the response.\n    at parseAndValidateObjectResult (/openops/node_modules/ai/src/generate-object/parse-and-validate-object-result.ts:33:11)\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at parseAndValidateObjectResultWithRepair (/openops/node_modules/ai/src/generate-object/parse-and-validate-object-result.ts:88:12)\n    at fn (/openops/node_modules/ai/src/generate-object/generate-object.ts:432:24)\n    at /openops/node_modules/ai/src/telemetry/record-span.ts:32:24\n    at generateObject (/openops/node_modules/ai/src/generate-object/generate-object.ts:264:12)"
[API]     errorMessage: "No object generated: could not parse the response."
[API]     errorName: "AI_NoObjectGeneratedError"
[API]     errorContext: "{\"cause\":{\"name\":\"AI_JSONParseError\",\"cause\":{},\"text\":\"<think>\nThe user is asking me to generate a chat name based on the conversation. Let me analyze what the conversation was about:\n\n1. User said \\"hi\\" - just a greeting\n2. User asked \\"what are my available tables?\\" - asking about OpenOps tables\n3. I responded asking for clarification\n4. User clarified \\"openops tables\\"\n5. I explained I don't have direct access to query OpenOps internal tables\n6. User asked \\"what tools can you access\\"\n7. I had an error (billing related)\n8. Now user wants me to generate a chat name\n\nThe main topic seems to be about:\n- Exploring OpenOps capabilities\n- Understanding available tables and tools in OpenOps\n- User trying to learn what they can do/access in OpenOps\n\nA good name should be specific and capture the essence of this conversation. Something like:\n- \\"OpenOps capabilities inquiry\\"\n- \\"OpenOps tables and tools\\"\n- \\"Exploring OpenOps access\\"\n- \\"OpenOps features question\\"\n- \\"Available OpenOps tools\\"\n\nI think \\"OpenOps features and tables\\" or \\"OpenOps capabilities inquiry\\" would work well. Let me keep it under 5 words.\n\n\\"OpenOps features and tools\\" - 4 words\n\\"OpenOps tables and tools\\" - 4 words\n\\"OpenOps capabilities question\\" - 3 words\n\\"Exploring OpenOps access\\" - 3 words\n\nI think \\"OpenOps tables and tools\\" captures the specific questions asked well.\n</think>\n\n{\n  \\"isGenerated\\": true,\n  \\"name\\": \\"OpenOps tables and tools\\"\n}\"},\"text\":\"<think>\nThe user is asking me to generate a chat name based on the conversation. Let me analyze what the conversation was about:\n\n1. User said \\"hi\\" - just a greeting\n2. User asked \\"what are my available tables?\\" - asking about OpenOps tables\n3. I responded asking for clarification\n4. User clarified \\"openops tables\\"\n5. I explained I don't have direct access to query OpenOps internal tables\n6. User asked \\"what tools can you access\\"\n7. I had an error (billing related)\n8. Now user wants me to generate a chat name\n\n

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.

2 participants