feat(providers): detect + configure claude/codex hosts and LLM providers - #21
Merged
Merged
Conversation
Add `ak x provider [status|pick|off]` so ruflo and agentic-qe can be configured to use one or both frontier CLIs, grounded in rUv source (ADR-034 ENABLE_* backends, @claude-flow/codex, `ruflo init --dual`, `ruflo providers`, aqe's AQE_LLM_PROVIDER + HybridRouter fallback chain). Two independent axes, claude-default (codex opt-in) so existing repos see zero change until opted in: - Hosts: claude/codex, both at once via dual-mode (ENABLE_CLAUDE_CODE/ ENABLE_CODEX in .claude/settings.local.json). - Providers: aqe's AQE_LLM_PROVIDER (any of claude-code/claude/openai/ gemini/openrouter/azure-openai/bedrock/cognitum/ollama) plus a deterministic, ordered fallback chain written to .agentic-qe/llm-config.json from kit.json; ruflo API providers via `ruflo providers configure`. API keys stay in the env, never kit.json. Install-method-aware: installs a host only when entirely absent, updates npm-managed hosts via the cached drift check, and never touches an external (mise/brew/native) install. All writes are reversible (`ak x provider off` restores or removes ak-managed files/env). Wired through status/sync/setup/verify; new codex-gated CLAUDE.md block; progressive-disclosure user guide in docs/PROVIDERS.md. 57 kit tests pass.
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.
What
Adds
ak x provider [status|pick|off]so ruflo and agentic-qe can be configured to use one or both frontier CLIs (claude,codex).ak's job stays what it is — a thin, reversible detect → heal → verify facilitator: the capability already exists downstream, soakdetects and wires it rather than reimplementing it.Grounded in rUv source: ruflo ADR-034 Optional MCP Backends (
ENABLE_CLAUDE_CODE/ENABLE_CODEX),@claude-flow/codex,ruflo init --dual,ruflo providers, and agentic-qe'sAQE_LLM_PROVIDERselector +HybridRouterfallback chain.Design — two independent axes, claude-default
Default is claude-only, codex opt-in, so existing repos see zero change until a user opts in (
isDefault()makes the heal a deliberate no-op).claude/codex, or both at once via dual-mode. Written asENABLE_*env into.claude/settings.local.json(same seam asCLAUDE_FLOW_DB_PATH).AQE_LLM_PROVIDER(any ofclaude-code/claude/openai/gemini/openrouter/azure-openai/bedrock/cognitum/ollama), plus a deterministic, ordered fallback chain written to.agentic-qe/llm-config.jsonfromkit.json(completeFallbackChain, per-providerenabled,_managedBy: agentic-kittag).ruflo providers configure.kit.json(aqe refuses to persist them anyway).Install & update — install-method-aware
npm i -g @anthropic-ai/claude-code/@openai/codex).ak status+ak sync).Reversible
ak x provider offstrips the managed env keys (leaving your other settings) and restores the pre-akllm-config.jsonfrom its one-time.bak, or removes anak-created file. It never touches a foreignllm-config.json(no_managedBytag).Wired through the lifecycle
ak status(hosts + providers rows, drift),ak sync(re-applies env + router),ak setup(project-scope wiring + codex hint),ak x verify providers(asserts on-disk chain matcheskit.json), a newcodex-gated CLAUDE.md managed block, and a progressive-disclosure user guide indocs/PROVIDERS.md.Honest constraint, verified in source
aqe is not limited to claude-code (my first read was wrong):
AQE_LLM_PROVIDER=<type>force-selects any provider inALL_PROVIDER_TYPES, and itsHybridRouterauto-enables any provider with an API key in the env. codex the CLI simply isn't an aqe provider type — its OpenAI models are reachable viaopenai.Tests
52 kit unit tests (new
tests/kit/providers.test.mjscovers env write/undo round-trips, the complete-chain writer, backup-restore vs remove, foreign-file safety, install-method guards) + statusline suite pass. Model IDs in docs/examples are current as of July 2026 (Claude Opus 4.8, GPT-5.6, Gemini 3.5 Flash) with a note to use whatever your provider offers.🤖 Generated with Claude Code