Skip to content
Open
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
7 changes: 4 additions & 3 deletions frontend/src/components/settings/OpenCodeModelDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ export function OpenCodeModelDialog({
}
}}
options={discoveredModelOptions}
placeholder="e.g., MiniMax-M2.7"
placeholder="e.g., MiniMax-M3"
disabled={isLoadingModels}
allowCustomValue={true}
/>
Expand Down Expand Up @@ -675,7 +675,7 @@ export function OpenCodeModelDialog({
<FormField control={form.control} name="contextLimit" render={({ field }) => (
<FormItem>
<FormLabel>Context Limit</FormLabel>
<FormControl><Input {...field} inputMode="numeric" placeholder="e.g., 200000" /></FormControl>
<FormControl><Input {...field} inputMode="numeric" placeholder="e.g., 1000000" /></FormControl>
<FormMessage />
</FormItem>
)} />
Expand Down Expand Up @@ -754,7 +754,8 @@ export function OpenCodeModelDialog({
<FormLabel>Variants JSON</FormLabel>
<FormControl>
<Textarea {...field} className="min-h-[120px] font-mono text-xs" placeholder={`{
"fast": {}
"adaptive": {},
"disabled": {}
}`} />
</FormControl>
<FormMessage />
Expand Down
11 changes: 10 additions & 1 deletion frontend/src/components/settings/OpenCodeModelsEditor.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,15 @@ describe('OpenCodeModelDialog — model discovery', () => {
vi.mocked(settingsApi.discoverOpenCodeModels).mockReset()
})

it('shows current MiniMax model metadata examples', async () => {
const { OpenCodeModelDialog } = await import('./OpenCodeModelDialog')
render(<OpenCodeModelDialog {...discoveryProps} />)

expect(screen.getByPlaceholderText('e.g., MiniMax-M3')).toBeInTheDocument()
expect(screen.getByPlaceholderText('e.g., 1000000')).toBeInTheDocument()
expect(screen.getByPlaceholderText(/"adaptive": \{\}[\s\S]*"disabled": \{\}/)).toBeInTheDocument()
})

it('shows a Discover button when a new API provider has a base URL', async () => {
const { OpenCodeModelDialog } = await import('./OpenCodeModelDialog')
render(<OpenCodeModelDialog {...discoveryProps} />)
Expand Down Expand Up @@ -429,7 +438,7 @@ describe('OpenCodeModelDialog — model discovery', () => {
expect(screen.getByText(/1 model found/i)).toBeInTheDocument()
})

const providerModelInput = screen.getByPlaceholderText('e.g., MiniMax-M2.7')
const providerModelInput = screen.getByPlaceholderText('e.g., MiniMax-M3')
fireEvent.focus(providerModelInput)

const option = await screen.findByRole('button', { name: 'gpt-4o' })
Expand Down