Add support for per-model configuration
A provider's models may now be provided in the config as a simple string, or as a mapping with at least a `name` key. This is a valid configuration: ```yaml models: - name: model-a reasoning: true - model-b ``` This opens the door to providing model-specific configuration, e.g. an overridden max tokens count, or whether the model is a 'reasoning' model.
This commit is contained in:
@@ -103,10 +103,10 @@ func (m *Model) getModelOptions() []list.OptionGroup {
|
||||
group := list.OptionGroup{
|
||||
Name: providerLabel,
|
||||
}
|
||||
for _, model := range p.Models {
|
||||
for _, model := range p.Models() {
|
||||
group.Options = append(group.Options, list.Option{
|
||||
Label: model,
|
||||
Value: modelOpt{provider, model},
|
||||
Label: model.Name,
|
||||
Value: modelOpt{provider, model.Name},
|
||||
})
|
||||
}
|
||||
modelOpts = append(modelOpts, group)
|
||||
|
||||
Reference in New Issue
Block a user