Skip to content

Stabilize OpenAI-compatible streamed tool-use test - #283

Merged
myzie merged 2 commits into
mainfrom
codex/reliable-tool-use-stream-test
Sep 3, 2026
Merged

Stabilize OpenAI-compatible streamed tool-use test#283
myzie merged 2 commits into
mainfrom
codex/reliable-tool-use-stream-test

Conversation

@myzie

@myzie myzie commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • force the named add tool in the streamed tool-use integration test
  • forward parallel_tool_calls through the OpenAI-compatible request adapter and disable parallel calls for this single-call test
  • add request-configuration regression coverage
  • update all legacy assert.Equal calls in openai_test.go to Wonton v0.2.1 actual-first ordering

Why

The live test used automatic tool choice while requiring exactly one tool call. OpenAI can validly answer without a tool in that mode, which caused the main-branch CI failure. The assertion arguments were also reversed, so the reported want and got values were misleading.

Validation

  • go test ./providers/openaicompletions -count=1
  • go test ./providers/openaicompletions -run TestToolUseStream -count=10
  • go test ./... -count=1
  • go vet ./...

Summary by CodeRabbit

  • New Features

    • Tool-enabled requests can now explicitly control whether multiple tool calls may run in parallel.
    • Added support for the optional parallel_tool_calls request setting.
  • Tests

    • Expanded coverage for forced single tool calls, prompt caching, streaming tool calls, message conversion, reasoning replay, and usage-token reporting.
    • Updated test assertions for consistency.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: 7aeed014-2a31-487b-937e-f6c78034ed4e

📥 Commits

Reviewing files that changed from the base of the PR and between 1e08ec9 and 7617fe6.

📒 Files selected for processing (3)
  • providers/openaicompletions/openai.go
  • providers/openaicompletions/openai_test.go
  • providers/openaicompletions/types.go

Included review availability: Your plan provides up to 5 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The OpenAI completions provider now propagates the configured parallel tool-call setting. The request type supports the corresponding JSON field. Tests add forced single-tool coverage and normalize assertion ordering.

Changes

OpenAI completions tool-call handling

Layer / File(s) Summary
Parallel tool-call request wiring
providers/openaicompletions/types.go, providers/openaicompletions/openai.go, providers/openaicompletions/openai_test.go
Request now supports parallel_tool_calls. Tool-enabled requests copy the configured value. Tests cover explicit single-tool selection and streaming responses.
Completions test validation
providers/openaicompletions/openai_test.go
Tests use the preferred assertion argument order and validate tool conversion, reasoning replay, usage tokens, cache counts, and streaming behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 7617f

The OpenAI-compatible adapter now carries the parallel tool-call setting, while streamed single-tool tests explicitly select the tool and disable parallel calls. No current merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.24% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: stabilizing the OpenAI-compatible streamed tool-use test.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/reliable-tool-use-stream-test

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

@myzie
myzie merged commit a8f74c4 into main Sep 3, 2026
1 of 2 checks passed
@myzie
myzie deleted the codex/reliable-tool-use-stream-test branch September 3, 2026 17:57
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