2.2 KiB
2.2 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec | |
|---|---|---|---|---|---|---|---|
| dynamic-provider-options-02 | Add resolution cache API | done | 2 |
|
docs/plans/dynamic-provider-options/plan.md | docs/specs/agents/requirements/dynamic-provider-options.md |
Add resolution cache API
Scope
Expose the model-aware probe through host utility resolution, a bounded runtime-only cache, and the authenticated agent-settings HTTP endpoint.
Acceptance conditions
- Identical agent/context requests share cached or in-flight work, refresh bypasses/invalidate the entry, and the cache cannot persist data to SQLite.
POST /api/v1/agent-models/:agentName/resolvevalidates the request, returns a complete normalized snapshot on success, and sanitizes failures.- Existing
GET /api/v1/agent-models/:agentNamebehavior remains compatible.
Files
apps/backend/internal/agent/hostutility/types.goapps/backend/internal/agent/hostutility/cache.goapps/backend/internal/agent/hostutility/manager.goapps/backend/internal/agent/hostutility/public.goapps/backend/internal/agent/hostutility/manager_test.goapps/backend/internal/agent/settings/dto/dto.goapps/backend/internal/agent/settings/controller/agent_config.goapps/backend/internal/agent/settings/controller/agent_config_test.goapps/backend/internal/agent/settings/handlers/handlers.goapps/backend/internal/agent/settings/handlers/handlers_test.go
Dependencies and inputs
dynamic-provider-options-01utility request/result.- Existing host utility availability, refresh, authorization, and settings route conventions.
Output contract
Provide a typed controller method and HTTP route matching the spec's request context and response shape. Cache key construction must be deterministic for maps, include future context fields, and have explicit TTL/invalidation tests.
Checks
cd apps/backend && go test ./internal/agent/hostutility ./internal/agent/settings/controller ./internal/agent/settings/handlers
Results: cd apps/backend && go test ./internal/agentctl/server/utility ./internal/agent/hostutility ./internal/agent/settings/controller ./internal/agent/settings/handlers -count=1 — passed.