-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat: add MiniMax provider support #1277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import type { ProviderCapabilities } from '../types'; | ||
|
|
||
| export const MINIMAX_CAPABILITIES: ProviderCapabilities = { | ||
| sessionResume: false, | ||
| mcp: false, | ||
| hooks: false, | ||
| skills: false, | ||
| toolRestrictions: false, | ||
| structuredOutput: false, | ||
| envInjection: true, | ||
| costControl: false, | ||
| effortControl: false, | ||
| thinkingControl: false, | ||
| fallbackModel: false, | ||
| sandbox: false, | ||
| }; |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,30 @@ | ||||||||||||||||||||||
| /** | ||||||||||||||||||||||
| * Typed config parsing for MiniMax provider defaults. | ||||||||||||||||||||||
| */ | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| export interface MiniMaxProviderDefaults { | ||||||||||||||||||||||
| [key: string]: unknown; | ||||||||||||||||||||||
| model?: string; | ||||||||||||||||||||||
| baseURL?: string; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| // Re-export so consumers can import the type from either location | ||||||||||||||||||||||
| export type { MiniMaxProviderDefaults as MiniMaxConfig }; | ||||||||||||||||||||||
|
Comment on lines
+5
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major Duplicate interface declaration — re-export from
Align with the Claude/Codex pattern by re-exporting from ♻️ Proposed fix-export interface MiniMaxProviderDefaults {
- [key: string]: unknown;
- model?: string;
- baseURL?: string;
-}
-
-// Re-export so consumers can import the type from either location
-export type { MiniMaxProviderDefaults as MiniMaxConfig };
+export type { MiniMaxProviderDefaults } from '../types';
+export type { MiniMaxProviderDefaults as MiniMaxConfig } from '../types';As per coding guidelines: "Always use 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /** | ||||||||||||||||||||||
| * Parse raw assistantConfig into typed MiniMax defaults. | ||||||||||||||||||||||
| * Defensive: invalid fields are silently dropped. | ||||||||||||||||||||||
| */ | ||||||||||||||||||||||
| export function parseMiniMaxConfig(raw: Record<string, unknown>): MiniMaxProviderDefaults { | ||||||||||||||||||||||
| const result: MiniMaxProviderDefaults = {}; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| if (typeof raw.model === 'string') { | ||||||||||||||||||||||
| result.model = raw.model; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| if (typeof raw.baseURL === 'string') { | ||||||||||||||||||||||
| result.baseURL = raw.baseURL; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| return result; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Re-export source is inconsistent with the canonical type location.
MiniMaxProviderDefaultsis re-exported here from./minimax/config, butpackages/providers/src/types.tsdeclares itself the "Single source of truth for provider-specific config shapes" and definesMiniMaxProviderDefaultsat lines 30-35. The config module currently redeclares the interface rather than re-exporting from./types, producing two structurally-identical types that can silently drift. See the comment onminimax/config.ts.🤖 Prompt for AI Agents