Repository navigation
feat(llm): Claude Code subscription backend + AWS provider isolation - #47
Merged
Merged
Conversation
…providers - Auto-detect the Claude Code CLI and use its subscription OAuth login as the Anthropic LLM backend (no API key needed). LiteLLM handles sk-ant-oat tokens; system prompts are shaped with the required Claude Code identity block. - Add agent/llm/ package: backend resolver + pluggable detector registry. - Surface the active LLM backend in the init wizard and Settings. - Restructure cloud-specific code under providers/ behind a CloudProvider protocol; move AWS tools/context/permissions/poller/events into providers/aws/. - Add CLOUD_PROVIDER setting (aws|azure|gcp); azure/gcp are stubs.
…_KEY unset Auto-detection only activates when no other provider is explicitly configured. Restructure .env.example to present Claude Code as the zero-config default.
…solution Covers token detection, model-slot mapping, env-key vs subscription precedence, expired-token flag, and the full backend resolution ladder (including the OpenRouter-blocks-Claude-Code case). Fully mocked — no ~/.claude access, no network, no API spend.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
claudeCLI is installed and logged in, OpenDevOps reuses its subscription login as the Anthropic backend — no API key, no.envchanges. LiteLLM (≥1.83) handles thesk-ant-oatOAuth token (Bearer + OAuth beta header), and system prompts are shaped with the required Claude Code identity block so subscription inference is accepted.src/agent/llm/): abackend.pyresolver +detectors/registry. Adding a provider = drop a file implementingLlmDetector, append toALL_DETECTORS.CloudProviderprotocol (src/providers/): AWS tools, context collection, permission checks, poller, and event ingestion moved intoproviders/aws/. NewCLOUD_PROVIDERsetting (aws|azure|gcp);azure/gcpare stubs. Agent core (LangGraph/LLM/skills) stays cloud-agnostic.Backend precedence
Auto-detection only activates when no other provider is explicitly configured. To use Claude Code, leave
LLM_MODEL,OPENROUTER_API_KEY,ANTHROPIC_API_KEY, andLLM_API_BASEunset. Docs and.env.exampleupdated to make this clear.Notes
git mv(history preserved); tool count unchanged (26).providers.aws.event_infradirectly (SQS/EventBridge provisioning is AWS-specific; generalizing the wizard is future work).Test plan
LLM_MODEL+OPENROUTER_API_KEY) — precedence over Claude Codeproviders/awsdispatchuv run devboots clean; poller/consumer start via the active provideruv run pytestgreen (198 passed, 4 skipped locally)