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

Method contextLimitForAgentModel

pkg/runtime/runtime.go:1446–1451  ·  view source on GitHub ↗
(ctx context.Context, a *agent.Agent, modelID modelsdev.ID)

Source from the content-addressed store, hash-verified

1444}
1445
1446func (r *LocalRuntime) contextLimitForAgentModel(ctx context.Context, a *agent.Agent, modelID modelsdev.ID) int64 {
1447 if a == nil || modelID.IsZero() {
1448 return 0
1449 }
1450 return r.effectiveContextLimit(ctx, a, r.resolveContextLimit(ctx, a.Model(ctx), modelID))
1451}
1452
1453// EmitAgentInfo implements [Runtime.EmitAgentInfo]: it refreshes the agent and
1454// team display without touching toolset discovery.

Callers 2

emitAgentAndTeamInfoMethod · 0.95
EmitStartupInfoMethod · 0.95

Calls 4

effectiveContextLimitMethod · 0.95
resolveContextLimitMethod · 0.95
ModelMethod · 0.80
IsZeroMethod · 0.45

Tested by

no test coverage detected