Private
Public Access
1
0

Work to simplify model config handling

Keep a direct reference to a provider.ModelConfig in TUI's AppModel,
rather than the names of the provider and model
This commit is contained in:
2025-07-29 01:41:58 +00:00
parent 5335b5c28f
commit 0cf0a4ff0d
5 changed files with 90 additions and 90 deletions

View File

@@ -19,7 +19,7 @@ import (
// Prompt prompts the configured the configured model and streams the response
// to stdout. Returns all model reply messages.
func Prompt(ctx *lmcli.Context, messages []conversation.Message, callback func(conversation.Message)) (*api.Message, error) {
modelConfig, err := ctx.GetModelProvider(*ctx.Config.Defaults.Model, "")
modelConfig, err := ctx.LookupModelProvider(*ctx.Config.Defaults.Model, "")
if err != nil {
return nil, err
}
@@ -203,7 +203,7 @@ Example response:
},
}
modelConfig, err := ctx.GetModelProvider(
modelConfig, err := ctx.LookupModelProvider(
*ctx.Config.Conversations.TitleGenerationModel, "",
)
if err != nil {