Skip to content

feat: add MiniMax as LLM provider for task decomposer#669

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

feat: add MiniMax as LLM provider for task decomposer#669
octo-patch wants to merge 1 commit intoComposioHQ:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

Add MiniMax as an alternative LLM provider for the task decomposition module, alongside Anthropic.

  • Introduce provider field in DecomposerConfig ("anthropic" | "minimax")
  • Create an internal LLMClient abstraction that routes to either Anthropic SDK or MiniMax OpenAI-compatible API
  • Handle MiniMax-specific behaviors: temperature clamping to [0, 1], <think> tag stripping for M2.5/M2.7 models
  • Support MINIMAX_API_KEY env var and optional MINIMAX_BASE_URL override
  • Update Zod config schema, example config, and README with MiniMax documentation

Files changed (8 files, ~982 additions)

File Change
packages/core/src/decomposer.ts LLM client abstraction + MiniMax provider
packages/core/src/config.ts Add provider enum to decomposer schema
packages/core/src/types.ts Add provider field to decomposer config
packages/core/src/index.ts Export new types
packages/core/src/__tests__/decomposer.test.ts 36 unit tests
packages/core/src/__tests__/decomposer-integration.test.ts 6 integration tests
agent-orchestrator.yaml.example Decomposer config with MiniMax option
README.md MiniMax provider documentation

Test plan

  • 36 unit tests pass
  • 6 integration tests pass
  • All 42 new tests pass alongside existing 525 tests
  • pnpm build succeeds with no type errors

Add MiniMax as an alternative LLM provider for the task decomposition
module, alongside Anthropic. MiniMax models are accessed via their
OpenAI-compatible API, so no additional SDK is needed.

Changes:
- Add provider field to DecomposerConfig (anthropic | minimax)
- Create LLM client abstraction layer (LLMClient interface)
- Implement MiniMax client via OpenAI-compatible API (fetch-based)
- Handle MiniMax-specific quirks: temperature clamping, think-tag strip
- Support MINIMAX_API_KEY env var and optional MINIMAX_BASE_URL override
- Update Zod config schema with provider enum validation
- Add decomposer section to example config
- Update README with MiniMax provider documentation
- 36 unit tests + 6 integration tests
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

return createMiniMaxClient();
case "anthropic":
default:
return createAnthropicClient();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Switch default silently masks unknown provider values

Medium Severity

The default case in createLLMClient falls through to createAnthropicClient(), meaning any future DecomposerProvider union member added without a corresponding switch case would silently use Anthropic instead of failing. Because default is combined with case "anthropic", TypeScript's exhaustiveness checking is also defeated — a never check in the default branch won't trigger a compile error when the union grows.

Fix in Cursor Fix in Web

formatSiblings,
propagateStatus,
stripThinkingTags,
createLLMClient,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Internal abstractions unnecessarily exported as public API

Low Severity

stripThinkingTags and createLLMClient are exported from index.ts but are not imported by any consumer package — only by internal tests (which import directly from decomposer.js). createLLMClient is explicitly documented as an "Internal abstraction" and its return type LLMClient is not exported, making it an awkward public API addition that increases the package's surface area without need.

Fix in Cursor Fix in Web

Triggered by project rule: BugBot Configuration

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