Skip to content

Document OpenAI tool-call finish_reason behavior#124

Merged
SantiagoDePolonia merged 1 commit intomainfrom
docs/openai-finish-reason-note
Mar 8, 2026
Merged

Document OpenAI tool-call finish_reason behavior#124
SantiagoDePolonia merged 1 commit intomainfrom
docs/openai-finish-reason-note

Conversation

@SantiagoDePolonia
Copy link
Copy Markdown
Contributor

@SantiagoDePolonia SantiagoDePolonia commented Mar 8, 2026

Summary

  • document that OpenAI may return tool calls with finish_reason: "stop"
  • note that the gateway preserves this upstream behavior for API parity

Validation

  • verified directly against the OpenAI API that chat tool-call responses for gpt-3.5-turbo and gpt-4o-mini can include tool calls while still returning finish_reason: "stop"
  • ran the repo commit hooks on this branch

Summary by CodeRabbit

Release Notes

No user-visible changes in this release. This update includes internal documentation improvements to clarify API behavior related to tool interactions and response handling.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 8, 2026

Note

Reviews paused

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ae1b1f86-7596-450f-a27f-12e5a9c69b53

📥 Commits

Reviewing files that changed from the base of the PR and between 3acf4cc and d662219.

📒 Files selected for processing (1)
  • internal/providers/openai/openai.go
 _______________________________________________________________________________________________________
< Make it easy to reuse. If it's easy to reuse, people will. Create an environment that supports reuse. >
 -------------------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ

✏️ Tip: You can disable in-progress messages and the fortune message in your review settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/openai-finish-reason-note

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 and usage tips.

@SantiagoDePolonia SantiagoDePolonia merged commit 7ff630a into main Mar 8, 2026
11 of 12 checks passed
@SantiagoDePolonia
Copy link
Copy Markdown
Contributor Author

@coderabbitai stop

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 8, 2026

@SantiagoDePolonia: Sure! I will pause automatic reviews for this PR.

✅ Actions performed

Reviews paused.

@SantiagoDePolonia SantiagoDePolonia deleted the docs/openai-finish-reason-note branch March 22, 2026 14:25
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