Skip to content

fix(vlm): default affected GPT tool calls to no reasoning - #6137

Merged
qin-ctx merged 1 commit into
volcengine:mainfrom
qin-ptr:fix/openai-chat-tool-defaults
Oct 15, 2026
Merged

qin-ctx merged 1 commit into
volcengine:mainfrom
qin-ptr:fix/openai-chat-tool-defaults

Conversation

@qin-ptr

@qin-ptr qin-ptr commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Description

Session commits using gpt-6-luna can fail when Chat Completions receives function tools with the automatically selected reasoning_effort: "low".

For the same gpt-6-luna request with tools and no explicit reasoning setting, the default changes from reasoning_effort: "low" to reasoning_effort: "none". This applies to GPT-5.4/5.5/5.6 and GPT-6 Sol/Luna aliases and snapshots. Requests without tools and the openai-codex Responses path retain their existing defaults. Explicit reasoning_effort and extra_request_body settings retain their existing precedence.

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

Related Issue

Fixes #5757

Related: #5762

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Apply shared completion defaults after the text and vision builders attach tools.
  • Select none by default for affected Chat Completions tool requests, excluding openai-codex.
  • Add three lines of logic and move two existing calls; no new configuration or tests.

Testing

  • Existing reasoning, extra-body, Codex, response-format, and thinking tests: 112 passed, 1 pre-existing failure. test_openai_async_completion_with_empty_tools_preserves_usage also fails against the unmodified backend because its expected usage dictionary omits completion_tokens_details.

  • Offline A/B check confirms the default gpt-6-luna tool request changes from low to none.

  • HTTP mock transport verified 56 actual OpenAI SDK request bodies across synchronous/asynchronous text and vision calls, including explicit configuration and unaffected-model controls. Codex Responses controls retained low.

  • Ruff lint/format checks and git diff --check passed.

  • I have added tests that prove my fix is effective or that my feature works

  • New and existing unit tests pass locally with my changes

  • I have tested this on the following platforms:

    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Not applicable.

Additional Notes

This changes automatic defaults only. An explicitly configured non-none effort can still be rejected by an affected Chat Completions endpoint. GPT-6 Astra and GPT-6.1 Sol require Responses for tool calling and are outside this fix.

Avoid invalid Chat Completions requests by selecting none for affected
models when tools are present. Preserve explicit settings and Codex defaults.

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
@qin-ctx
qin-ctx merged commit ee908e7 into volcengine:main Oct 15, 2026
8 of 9 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OpenViking project Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: OpenAI VLM sends reasoning_effort with function tools → 400 on gpt-6-luna (memory extraction and WM update fail)

2 participants