Skip to content

feat: opt in to client-owned tool loops - #787

Merged
seonghobae merged 2 commits into
fix/provider-temperature-capability-negotiation-on-765-v2from
codex/opencode-tool-loop
Aug 20, 2026
Merged

feat: opt in to client-owned tool loops#787
seonghobae merged 2 commits into
fix/provider-temperature-capability-negotiation-on-765-v2from
codex/opencode-tool-loop

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Summary

Stacked on the current provider-capability branch fix/provider-temperature-capability-negotiation-on-765-v2 so the diff stays limited to the gateway tool-loop contract.

  • reuse the existing provider-neutral proxy_completion path for OpenAI Chat and Responses tool loops
  • require explicit X-Contextual-Orchestrator-Tool-Loop: v1 opt-in
  • preserve the existing fail-closed 422 for ordinary clients
  • reject streaming tool loops until a provider-shape-preserving streaming relay exists
  • record bounded analytics for the opt-in passthrough paths
  • update ADR 0014 and HTTP honesty coverage

Verification

  • uv run --with pytest pytest -q — 1,474 passed
  • focused passthrough/tool-shape tests — 31 passed
  • python3 -m compileall -q contextual_orchestrator/server.py — passed
  • git diff --check — passed

No approval, merge, check success, or deployment evidence is manufactured.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0c023d28-a0ac-4349-8a80-93c504b04dbb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Review/fix pass on exact current HEAD 36e3be0bca5f64b7c5150351b2d505ea536a46a4:

  • Fixed all three stale __main__ test calls that caused ruff check F821 failures.
  • Focused HTTP-honesty/passthrough suite: 51 passed.
  • Ruff and git diff --check: passed.
  • The branch is stacked on cf4a4501fa5057f89b21cad5033c5925755cd150; no predecessor evidence was reused.

@opencode-agent please review this exact HEAD.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head verification completed on 36e3be0bca5f64b7c5150351b2d505ea536a46a4 (remote re-fetched immediately before reporting):

  • Full unit and contract suite: 1474 passed in 626.39s.
  • Focused tool-loop/passthrough suite: 51 passed.
  • Ruff and git diff --check: passed.
  • No predecessor evidence was reused; the stack base remains cf4a4501fa5057f89b21cad5033c5925755cd150.

@opencode-agent please review this exact current HEAD.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head proof for 36e3be0bca5f64b7c5150351b2d505ea536a46a4:

  • The client-owned tool loop remains explicit: without X-Contextual-Orchestrator-Tool-Loop: v1, tool execution fails closed; the opt-in path preserves bounded request validation and OpenAI tool shape.
  • Focused tool-loop suite: 27 passed.
  • Full exact-tree suite: 1474 passed in 650.65s.
  • Ruff, compileall, and git diff --check: passed.

This PR remains stacked on the temperature contract parent and protected evidence. No self-approval, admin merge, or force-push was used.

@seonghobae
seonghobae merged commit 41c0c87 into fix/provider-temperature-capability-negotiation-on-765-v2 Aug 20, 2026
1 check passed
@seonghobae
seonghobae deleted the codex/opencode-tool-loop branch August 20, 2026 16:45
seonghobae added a commit that referenced this pull request Aug 20, 2026
* feat: opt in to client-owned tool loops

* test: repair stale standalone test entrypoints
seonghobae added a commit that referenced this pull request Aug 20, 2026
…ation line (#779)

* fix: negotiate unsupported temperature capability

* test(protocol): preserve 4xx evidence and negotiated retry state

* fix: preserve negotiated temperature capability

* merge: integrate automatic embedding selection with temperature negotiation (#791)

* feat: auto-select embedding agents

* fix: align embedding selection API contract

* test: cover embedding capability selection boundaries

* test: declare embedding capability in embedding fixtures

* style: normalize embedding HTTP fixture imports

* docs: assign unique embedding selection ADR number

* docs: assign unique sampling capability ADR number

* feat: opt in to client-owned tool loops (#787)

* feat: opt in to client-owned tool loops

* test: repair stale standalone test entrypoints

* fix: reject streaming responses tool loops

* fix: enforce total inbound body deadline

* test: keep static checks clean
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