trackCustomModel adds a custom model to the session's history if not already present.
(modelRef string)
| 1072 | |
| 1073 | // trackCustomModel adds a custom model to the session's history if not already present. |
| 1074 | func (a *App) trackCustomModel(modelRef string) { |
| 1075 | if a.session == nil { |
| 1076 | return |
| 1077 | } |
| 1078 | |
| 1079 | // Check if already tracked |
| 1080 | if slices.Contains(a.session.CustomModelsUsed, modelRef) { |
| 1081 | return |
| 1082 | } |
| 1083 | |
| 1084 | a.session.CustomModelsUsed = append(a.session.CustomModelsUsed, modelRef) |
| 1085 | slog.Debug("Tracked custom model in session", "session_id", a.session.ID, "model", modelRef) |
| 1086 | } |
| 1087 | |
| 1088 | // SupportsModelSwitching returns true if the runtime supports model switching. |
| 1089 | func (a *App) SupportsModelSwitching() bool { |
no test coverage detected