Skip to content

feat(harness)!: read the model and MCP servers from the agent document's gateway sections - #19

Merged
yash-kark merged 1 commit into
feat/p1-sdk-2-remove-events-sinkfrom
feat/p1-sdk-9-agent-doc-sections
Oct 28, 2026
Merged

yash-kark merged 1 commit into
feat/p1-sdk-2-remove-events-sinkfrom
feat/p1-sdk-9-agent-doc-sections

Conversation

@yash-kark

Copy link
Copy Markdown
Contributor

Stack: 9 of 10 (base #18). Plan: .claude/plans/p1-sdk-egress-routes.md phase 9 (C1; D19, D20). This has to be in the stage images before old-CAS #164 deploys (X14).

What changes

  • model_of returns llm.config.model, or None when llm or config is null or the model is blank. None means the image's own model is used.
  • parse_bindings now takes the mcp section:
    • null section, or null servers → no bindings;
    • mcp must be an object / mcp.servers must be a list;
    • entry errors name mcp.servers[i];
    • provider, needs_your_connection and standard_server_id are ignored.
  • Every binding is attached to the engine. Removed: mcp_mode, DEFAULT_MCP_MODE and build_mcp_servers(mcp_mode=).
  • ResolvedAgent loses gateway_type, gateway_base_url, gateway_completions_url, has_native_gateway and mcp_mode. The generic-gateway and unresolved-binding refusals are gone; the orchestration refusal stays.
  • dispatch_model: for gitagent, a model without a provider: prefix always gets openai:. The Claude engine still strips a prefix.
  • No fallback to model, model_gateway, mcp_servers, mcp_mode or rai_policy_id. A pre-#164 document resolves with no model and no MCP servers. guardrails is not read.
  • Fixture: the #164 shape (llm kong claude-sonnet-4-5, guardrails, mcp).
  • Docs: guide §4, §6, §10, §11, §12; ARCHITECTURE; e2e example; CHANGELOG Changed and Removed.

Tests

  • ruff clean; mypy at 18 (baseline); pytest -m "not integration": 608 passed.
  • New or updated:
    • test_model_from_llm_config
    • test_null_llm_uses_the_image_model (7 shapes)
    • test_legacy_fields_are_ignored
    • test_guardrails_section_ignored
    • test_bound_mcp_servers_are_resolved
    • test_a_binding_without_a_name_refuses_the_agent
    • test_parses_mcp_section and the malformed-section cases
    • test_kong_model_reaches_the_claude_engine_untouched
  • Removed: the studio-mode, generic-gateway and gateway-URL tests.

🤖 Generated with Claude Code

@vrajp-lyzr
vrajp-lyzr added this pull request to stack #24 October 27, 2026 12:33
@yash-kark yash-kark mentioned this pull request Oct 28, 2026
@yash-kark
yash-kark force-pushed the feat/p1-sdk-9-agent-doc-sections branch 5 times, most recently from e0c93ea to f0c4350 Compare October 28, 2026 17:17
Base automatically changed from feat/p1-sdk-8-mcp-by-name to feat/p1-sdk-2-remove-events-sink October 28, 2026 17:19
…t's gateway sections

The agent document (after old-CAS #164) is read from llm.config.model and
mcp.servers; guardrails is not read. The model-gateway fields and refusals,
mcp_mode and DEFAULT_MCP_MODE are removed; every binding is attached to the
engine. For gitagent a model without a provider prefix gets openai:.

BREAKING CHANGE: ResolvedAgent loses gateway_* fields, has_native_gateway and
mcp_mode; legacy document fields are no longer read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yash-kark
yash-kark force-pushed the feat/p1-sdk-9-agent-doc-sections branch from f0c4350 to e329912 Compare October 28, 2026 17:19
@yash-kark
yash-kark merged commit 2beb231 into feat/p1-sdk-2-remove-events-sink Oct 28, 2026
1 of 5 checks passed
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.

1 participant