Summary
Implement the Anthropic subscription adapter path on top of the shared subscription auth foundation.
This issue covers Anthropic-specific runtime behavior when Loomkin uses subscription OAuth credentials instead of standard API keys.
Depends On
Scope
Adapter behavior
- Add Anthropic subscription auth mode selection at runtime.
- Route requests through the correct Anthropic endpoint path for this mode.
- Apply Anthropic subscription identity/header behavior required by this auth mode.
- Keep standard Anthropic API-key flow as fallback.
Request shaping
- Implement any required tool-name/system-context transformations for compatibility in subscription mode.
- Ensure tool-call and streaming behavior remain compatible with Loomkin’s current agent loop.
Risk controls
- Explicit user opt-in before enabling Anthropic subscription mode.
- Clear warning copy about policy/risk tradeoffs.
- Safe fallback behavior when subscription auth is invalid/expired/revoked.
Observability
- Add adapter-level telemetry for mode selection, auth failures, and fallback activation.
- Keep secrets redacted across all error/log surfaces.
Out of Scope
- Shared OAuth lifecycle implementation.
- Codex/Gemini adapter behavior.
- Coding-plan provider integrations.
Acceptance Criteria
Implementation Touchpoints
lib/loomkin/agent_loop.ex
lib/loomkin/session/architect.ex
lib/loomkin/teams/agent.ex
lib/loomkin/models.ex
lib/loomkin_web/live/model_selector_component.ex
Related
Summary
Implement the Anthropic subscription adapter path on top of the shared subscription auth foundation.
This issue covers Anthropic-specific runtime behavior when Loomkin uses subscription OAuth credentials instead of standard API keys.
Depends On
Scope
Adapter behavior
Request shaping
Risk controls
Observability
Out of Scope
Acceptance Criteria
Implementation Touchpoints
lib/loomkin/agent_loop.exlib/loomkin/session/architect.exlib/loomkin/teams/agent.exlib/loomkin/models.exlib/loomkin_web/live/model_selector_component.exRelated