-
Notifications
You must be signed in to change notification settings - Fork 24
Subscription-Backed Model Support (Umbrella) #103
Copy link
Copy link
Open
Description
Summary
Add subscription-backed model support as a first-class Loomkin runtime path, while keeping the current API-key req_llm path fully functional.
This is the umbrella issue. The implementation is split so we can ship in stages, verify each provider path properly, and avoid one huge risky PR.
Problem
- Loomkin currently routes model execution through API-key provider flows only.
- There is no subscription OAuth lifecycle in the app yet (auth start, callback, refresh, revoke).
- Current config parsing does not yet support subscription auth/provider sections as first-class runtime config.
- Provider discovery and cost tracking are currently tuned for API-key usage, not subscription-backed auth/accounting modes.
Verified Constraints (as of March 3, 2026)
- Runtime model calls are driven by
provider:modelstrings andReqLLM.stream_text/3. - No
/loginauth command/callback flow exists in the current LiveView/router stack. req_llmin this repo supportszai_coderandzai_coding_planalready.- Moonshot/MiniMax need explicit provider strategy in Loomkin runtime (native provider module, registered custom provider, or dependency update path).
Delivery Plan (Split)
This umbrella is delivered by:
- #105 — Subscription Auth Foundation (OAuth, Token Lifecycle, Config)
- #106 — Anthropic Subscription Adapter
- #107 — Codex + Gemini Subscription Adapters
- #104 — Coding Plan API Providers (Z.AI, Moonshot, MiniMax)
Scope
In scope
- Subscription auth foundation (OAuth lifecycle, token lifecycle, secure storage).
- Anthropic subscription adapter path.
- Codex and Gemini subscription adapter paths.
- Coding-plan API provider path for Z.AI, Moonshot, and MiniMax.
- Cost and budget semantics for subscription-backed requests.
Out of scope
- Removing or replacing existing API-key model execution.
- Shipping all providers in a single PR.
- Unrelated agent-loop architecture rewrites.
Cross-Issue Requirements
- Backward compatibility: existing API-key model flow must keep working.
- Explicit fallback behavior when subscription auth is missing/expired/disabled.
- Token/account secrets must be redacted in logs, events, and UI surfaces.
- Config validation errors must be actionable and user-facing.
- Subscription-backed usage must produce deterministic budget behavior.
Umbrella Acceptance Criteria
- All child issues listed above are completed and merged.
- Subscription auth + provider configuration is documented in one place.
- End-to-end flows verified for Anthropic, Codex, Gemini, and coding-plan providers.
- Existing API-key paths pass regression checks after rollout.
- Dashboard/session reporting correctly reflects subscription-backed usage accounting.
Implementation Touchpoints
lib/loomkin/config.exlib/loomkin/models.exlib/loomkin/agent_loop.exlib/loomkin/session/architect.exlib/loomkin/teams/agent.exlib/loomkin/teams/cost_tracker.exlib/loomkin/teams/pricing.exlib/loomkin_web/live/workspace_live.exlib/loomkin_web/live/model_selector_component.exlib/loomkin_web/router.ex
Related GitHub Issues
- Adaptive Agent Roles & Dynamic Team Composition #67 (Adaptive Agent Roles & Dynamic Team Composition)
- Cost & Token Analytics Dashboard #68 (Cost & Token Analytics Dashboard)
- Subscription-Backed Model Support (Umbrella) #103 (this umbrella issue in GitHub)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels