Skip to content

fix gpt 5.4 tool calling with reasoning#58

Merged
j4ys0n merged 1 commit into
mainfrom
ptc
Mar 17, 2026
Merged

fix gpt 5.4 tool calling with reasoning#58
j4ys0n merged 1 commit into
mainfrom
ptc

Conversation

@j4ys0n
Copy link
Copy Markdown
Contributor

@j4ys0n j4ys0n commented Mar 17, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 17, 2026 17:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the OpenAI Chat Completions parameter mapping for GPT‑5 family models to handle a model-specific incompatibility between reasoning_effort and function tools (notably gpt-5.4).

Changes:

  • Add a GPT‑5 support capability flag to indicate whether function tools can be used alongside reasoning_effort.
  • Update OpenAIMapper to omit reasoning_effort when the selected GPT‑5 model does not support it with function tools.
  • Add a unit test covering the gpt-5.4 + function tools behavior, and bump package version.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/unit/core/mapping/openai.mapper.spec.ts Adds coverage to ensure reasoning_effort is omitted for gpt-5.4 when function tools are present.
src/core/mapping/openai.mapper.ts Implements conditional omission of reasoning_effort based on model support + presence of tools.
src/core/mapping/gpt5.support.ts Extends GPT‑5 support metadata with supportsFunctionToolsWithReasoning and sets gpt-5.4 to false.
package.json Bumps SDK version from 1.12.0 to 1.12.1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@j4ys0n j4ys0n merged commit b1c4173 into main Mar 17, 2026
5 checks passed
@j4ys0n j4ys0n deleted the ptc branch March 17, 2026 18:09
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.

2 participants