MCPcopy Index your code
hub / github.com/docker/docker-agent / trackCustomModel

Method trackCustomModel

pkg/app/app.go:1074–1086  ·  view source on GitHub ↗

trackCustomModel adds a custom model to the session's history if not already present.

(modelRef string)

Source from the content-addressed store, hash-verified

1072
1073// trackCustomModel adds a custom model to the session's history if not already present.
1074func (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.
1089func (a *App) SupportsModelSwitching() bool {

Callers 1

SetCurrentAgentModelMethod · 0.95

Calls 1

DebugMethod · 0.80

Tested by

no test coverage detected