Skip to content

fix(mcp): raise output_schema_hint_bytes default to 1024 and fix stub event name#3106

Merged
bug-ops merged 1 commit intomainfrom
3084-3087-mcp-output-schema
Apr 17, 2026
Merged

fix(mcp): raise output_schema_hint_bytes default to 1024 and fix stub event name#3106
bug-ops merged 1 commit intomainfrom
3084-3087-mcp-output-schema

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Apr 17, 2026

Summary

Files changed

  • crates/zeph-config/src/channels.rsdefault_output_schema_hint_bytes() 512 → 1024, doc comment updated
  • crates/zeph-llm/src/openai/mod.rs — struct default + event name fix
  • crates/zeph-llm/src/openai/tests.rs — 2 new boundary tests
  • crates/zeph-llm/src/claude/mod.rs — struct default + event name fix
  • crates/zeph-llm/src/claude/tests.rs — 2 new boundary tests

Test plan

  • cargo nextest run --config-file .github/nextest.toml --workspace --lib --bins — 8177 tests pass
  • cargo +nightly fmt --check — clean
  • cargo clippy --workspace --lib --bins -- -D warnings — clean
  • Live session: verify event="mcp.output_schema.stub_used" in WARN log with Todoist MCP connected

Closes #3084, #3087

… event name

The 512-byte default caused stub fallback for most real-world MCP tool
schemas, making forward_output_schema largely ineffective at default config.
Raised default to 1024 in zeph-config and both LLM backend struct defaults.

The WARN emitted on the budget-exceeded path used
event="mcp.output_schema.forwarded_to_llm", implying the real schema was
forwarded when only a stub was sent. Changed to event="mcp.output_schema.stub_used"
in openai and claude backends so operators can distinguish the two paths
in telemetry and log search.

Added 6 unit tests: default value assertion in zeph-config, boundary tests
for schema-fits vs stub path in openai and claude.

Closes #3084, #3087
@bug-ops bug-ops force-pushed the 3084-3087-mcp-output-schema branch from dcd0133 to 92a0e97 Compare April 17, 2026 13:28
@bug-ops bug-ops enabled auto-merge (squash) April 17, 2026 13:28
@bug-ops bug-ops merged commit ee5d225 into main Apr 17, 2026
32 checks passed
@bug-ops bug-ops deleted the 3084-3087-mcp-output-schema branch April 17, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation llm zeph-llm crate (Ollama, Claude) rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

1 participant