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)
| 317 | // generation still succeeds if the dedicated model is unavailable. The |
| 318 | // result never contains nil entries. |
| 319 | func (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 |