Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/agent/configurator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ function prepareOpenCode(options: AgentSetupOptions, path: string): PreparedAgen
return [
{ path: ['provider', 'minimax', 'models', model.id, 'name'], value: model.id },
{ path: ['provider', 'minimax', 'models', model.id, 'reasoning'], value: true },
{ path: ['provider', 'minimax', 'models', model.id, 'temperature'], value: true },
{ path: ['provider', 'minimax', 'models', model.id, 'temperature'], value: false },
{
path: ['provider', 'minimax', 'models', model.id, 'attachment'],
value: input.includes('image'),
Expand Down Expand Up @@ -911,8 +911,12 @@ function preparePi(options: AgentSetupOptions, paths: string[]): PreparedAgentFi
name: model.id,
reasoning: true,
...(model.id === 'MiniMax-M3'
? { compat: { forceAdaptiveThinking: true } }
: { thinkingLevelMap: { off: null } }),
? { compat: { forceAdaptiveThinking: true, supportsTemperature: false } }
: {
// Always thinks (no off level); effort low..max via output_config.effort; no temperature.
compat: { forceAdaptiveThinking: true, supportsTemperature: false },
thinkingLevelMap: { off: null, minimal: null, xhigh: 'xhigh', max: 'max' },
}),
input: [...model.input],
contextWindow: model.contextWindow,
maxTokens: model.maxTokens,
Expand Down
10 changes: 7 additions & 3 deletions test/agent/configurator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,14 @@ describe('agent configurator', () => {
expect(openCode.provider.minimax.models['keep-model']).toEqual({ name: 'Keep' });
expect(openCode.provider.minimax.models['MiniMax-M3'].custom).toBe(true);
expect(openCode.provider.minimax.models['MiniMax-M3'].attachment).toBe(true);
expect(openCode.provider.minimax.models['MiniMax-M3'].temperature).toBe(false);
expect(openCode.provider.minimax.models['MiniMax-M3'].modalities)
.toEqual({ input: ['text', 'image'], output: ['text'] });
expect(openCode.provider.minimax.models['MiniMax-M3'].limit)
.toEqual({ context: 1_000_000, output: 128000 });
const m31OpenCode = openCode.provider.minimax.models['MiniMax-M3.1-Flash'];
expect(m31OpenCode.reasoning).toBe(true);
expect(m31OpenCode.temperature).toBe(true);
expect(m31OpenCode.temperature).toBe(false);
expect(m31OpenCode.interleaved).toEqual({ field: 'reasoning_content' });
expect(m31OpenCode.variants.default.reasoningEffort).toBe('max');
expect(m31OpenCode.variants.none.disabled).toBe(true);
Expand Down Expand Up @@ -310,8 +311,11 @@ describe('agent configurator', () => {
});
expect(piModels.providers['minimax-cn'].models[1].thinkingLevelMap).toBeUndefined();
expect(piModels.providers['minimax-cn'].models[1].compat)
.toEqual({ supportsStrictTools: true, forceAdaptiveThinking: true });
expect(piModels.providers['minimax-cn'].models[2].thinkingLevelMap).toEqual({ off: null });
.toEqual({ supportsStrictTools: true, forceAdaptiveThinking: true, supportsTemperature: false });
expect(piModels.providers['minimax-cn'].models[2].thinkingLevelMap)
.toEqual({ off: null, minimal: null, xhigh: 'xhigh', max: 'max' });
expect(piModels.providers['minimax-cn'].models[2].compat)
.toEqual({ forceAdaptiveThinking: true, supportsTemperature: false });
expect(piModels.providers['minimax-cn'].api).toBe('anthropic-messages');
expect(piModels.providers['minimax-cn'].baseUrl).toBe('https://api.minimax.cn/anthropic');
expect(piModels.providers['minimax-cn'].models.map((model: { id: string }) => model.id))
Expand Down
Loading