MCPcopy
hub / github.com/docker/docker-agent / TitleModels

Method TitleModels

pkg/agent/agent.go:319–328  ·  view source on GitHub ↗

TitleModels returns the ordered list of providers to use for session-title generation. The dedicated title model (when configured) comes first, followed by the agent's current model and its fallbacks so title generation still succeeds if the dedicated model is unavailable. The result never contains

(ctx context.Context)

Source from the content-addressed store, hash-verified

317// generation still succeeds if the dedicated model is unavailable. The
318// result never contains nil entries.
319func (a *Agent) TitleModels(ctx context.Context) []provider.Provider {
320 var models []provider.Provider
321 if a.titleModel != nil {
322 models = append(models, a.titleModel)
323 }
324 if m := a.Model(ctx); m != nil {
325 models = append(models, m)
326 }
327 return append(models, a.fallbackModels...)
328}
329
330// CompactionModel returns the dedicated model configured for session
331// compaction (summary generation), or nil when none was configured (in which

Callers 4

runtimeForSessionMethod · 0.80
TitleGeneratorMethod · 0.80
TestTitleModelResolutionFunction · 0.80
runDebugTitleCommandMethod · 0.80

Calls 1

ModelMethod · 0.95

Tested by 1

TestTitleModelResolutionFunction · 0.64