getAgentModelID returns the model ID for an agent. The zero ID is returned when no model is configured.
(ctx context.Context, a *agent.Agent)
| 1253 | // getAgentModelID returns the model ID for an agent. The zero ID is |
| 1254 | // returned when no model is configured. |
| 1255 | func getAgentModelID(ctx context.Context, a *agent.Agent) modelsdev.ID { |
| 1256 | if a == nil { |
| 1257 | return modelsdev.ID{} |
| 1258 | } |
| 1259 | if model := a.Model(ctx); model != nil { |
| 1260 | return model.ID() |
| 1261 | } |
| 1262 | return modelsdev.ID{} |
| 1263 | } |
| 1264 | |
| 1265 | // getEffectiveModelID returns the currently active model ID for an agent, accounting |
| 1266 | // for any active fallback cooldown. During a cooldown period, this returns the fallback |
no test coverage detected