-
Notifications
You must be signed in to change notification settings - Fork 25
Anthropic Subscription Adapter #106
Copy link
Copy link
Open
Description
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
- Anthropic subscription mode works end-to-end with valid auth.
- Required Anthropic subscription headers/identity behavior are applied correctly.
- Streaming and tool-call paths work in subscription mode.
- Invalid/expired auth triggers deterministic fallback and user-visible status.
- API-key Anthropic flow remains backward compatible.
- Integration tests cover happy path, expired auth, revoked auth, and fallback path.
Implementation Touchpoints
lib/loomkin/agent_loop.exlib/loomkin/session/architect.exlib/loomkin/teams/agent.exlib/loomkin/models.exlib/loomkin_web/live/model_selector_component.ex
Related
- Umbrella: #103 — Subscription-Backed Model Support (Umbrella)
- Adaptive Agent Roles & Dynamic Team Composition #67 (Adaptive Agent Roles & Dynamic Team Composition) — model/backend routing intersects role execution behavior.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels