Skip to content

feat(agent): bring-your-own-MODEL - any AI drives the frozen MCP surface - #232

Merged
NickFlach merged 1 commit into
mainfrom
feat/byo-any-model
Jul 21, 2026
Merged

feat(agent): bring-your-own-MODEL - any AI drives the frozen MCP surface#232
NickFlach merged 1 commit into
mainfrom
feat/byo-any-model

Conversation

@NickFlach

Copy link
Copy Markdown
Collaborator

What

Opens the BYO-key agent (#231) to any model, not just Claude — the frozen MCP surface (ADR-0020) was built for any external consumer, and now the agent honors that:

  • scripts/qos_agent.py — the provider-agnostic entrypoint.
    • --provider anthropic (default): Claude via the Anthropic SDK's tool_runner + MCP conversion helpers — behavior unchanged from feat(agent): Claude drives QuantumOS via the frozen MCP tools (BYO key) #231.
    • --provider openai: any OpenAI-compatible /chat/completions endpoint — OpenAI, OpenRouter, Groq, DeepSeek, LM Studio, llama.cpp server, or a keyless local Ollama (--base-url http://localhost:11434/v1). A plain function-calling loop converts the same 22 frozen MCP tools to function schemas directly (still zero tool duplication) and feeds tool errors back to the model instead of dying.
    • Credentials resolve before any VM spawns; the guaranteed-shutdown finally and the --max-turns key-burn guard cover both providers.
  • scripts/qos_claude_agent.py → compat shim; the old CLI works verbatim.
  • requirements-agent.txt (anthropic[mcp] + openai + mcp); requirements-claude-agent.txt now -r-includes it.
  • Makefile: qos-agent / qos-agent-list with PROVIDER= / MODEL= / BASE_URL= knobs; qos-claude / qos-claude-list kept as aliases.

Post-launch README refresh

  • The roadmap still listed ADR-0019 / ADR-0020 / ADR-0021 as planned — all three shipped in v0.5. Replaced with a ✅ v0.5 Done block and an honest Next (N=5 societies, audit actor attribution).
  • MCP tool count corrected 21 → 22 (matches contracts/mcp/v1-tools.json), BYO-model agent surfaced in "What runs today", Contributing pointers updated.

Verified (WSL, no key spent)

  • py_compile both entrypoints.
  • --list-tools enumerates all 22 tools end-to-end through both qos_agent.py and the shim.
  • Missing-key and missing-model guards exit cleanly before any VM boots.
  • MCP→OpenAI schema conversion of the real 22-tool list is well-formed and JSON-serializable.
  • Live agent loops remain bring-your-own-key by design and were not run.

🤖 Generated with Claude Code

The BYO-key agent (#231) was Claude-only. The frozen MCP surface (ADR-0020)
was built for ANY external consumer, so the agent now is too:

- scripts/qos_agent.py — provider-agnostic entrypoint. --provider anthropic
  (default, Claude via tool_runner + MCP helpers, unchanged behavior) or
  --provider openai: ANY OpenAI-compatible /chat/completions endpoint
  (OpenAI, OpenRouter, Groq, DeepSeek, LM Studio, llama.cpp, keyless local
  Ollama via --base-url). The openai path converts the same 22 frozen MCP
  tools to function-calling schemas directly — still zero tool duplication —
  and feeds tool errors back to the model instead of dying. Credentials are
  resolved BEFORE any VM spawns; the guaranteed-shutdown finally and the
  --max-turns key-burn guard cover both providers.
- scripts/qos_claude_agent.py — compat shim; old CLI works verbatim.
- requirements-agent.txt (anthropic[mcp] + openai + mcp); the old
  requirements-claude-agent.txt now -r-includes it.
- Makefile: qos-agent / qos-agent-list (PROVIDER/MODEL/BASE_URL knobs);
  qos-claude / qos-claude-list kept as aliases.
- README post-launch refresh: the roadmap still listed ADR-0019/0020/0021 as
  planned — all three shipped in v0.5; new Done block + honest Next (N=5,
  audit actor attribution). MCP tool count corrected 21 -> 22 and the BYO
  agent surfaced in "What runs today".

Verified (WSL): py_compile both entrypoints; --list-tools enumerates all 22
tools through qos_agent.py AND the shim; missing-key/missing-model guards
exit cleanly before any VM boot; MCP->OpenAI schema conversion of the real
22-tool list is well-formed and JSON-serializable. Live loops remain BYO-key.

Co-Authored-By: Claude Fable 5 <[email protected]>
@NickFlach
NickFlach merged commit d2a694e into main Jul 21, 2026
27 checks passed
@NickFlach
NickFlach deleted the feat/byo-any-model branch July 21, 2026 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants