Skip to content

Fix DeepSeek reasoning test shim - #7169

Merged
shimmyshimmer merged 1 commit into
mainfrom
agent/fix-deepseek-reasoning-test-shim
Jul 16, 2026
Merged

shimmyshimmer merged 1 commit into
mainfrom
agent/fix-deepseek-reasoning-test-shim

Conversation

@shimmyshimmer

Copy link
Copy Markdown
Member

Summary

  • Replace the partial SimpleNamespace test shim with an uninitialized real LlamaCppBackend instance.
  • Keep the test isolated from backend startup while retaining normal method lookup for helper methods.
  • Restore the DeepSeek reasoning test coverage across the Backend CI Python matrix.

Root cause

_request_reasoning_kwargs now delegates final normalization to _coerce_reasoning_effort. The test bound _request_reasoning_kwargs to a SimpleNamespace, so normal class method lookup was unavailable and four tests failed with AttributeError.

Impact

This changes test setup only. Production backend behavior is unchanged. The test now exercises the same helper method resolution used by a real LlamaCppBackend instance, which makes it less likely to break when the production method delegates to another backend helper.

Validation

  • Reproduced the four failures on current main.
  • Verified all eight DeepSeek reasoning tests on Python 3.10, 3.11, 3.12, and 3.13 in isolated uv environments.
  • Ran git diff --check.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the test helper function _kwargs_for in test_deepseek_v4_thinking_effort.py. It replaces the use of SimpleNamespace and manual descriptor binding with a mock LlamaCppBackend instance created via object.__new__ to directly invoke _request_reasoning_kwargs. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@shimmyshimmer
shimmyshimmer marked this pull request as ready for review July 16, 2026 08:38
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: bdec7ddbe6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@shimmyshimmer
shimmyshimmer merged commit 01e9230 into main Jul 16, 2026
39 of 45 checks passed
@shimmyshimmer
shimmyshimmer deleted the agent/fix-deepseek-reasoning-test-shim branch July 16, 2026 10:17
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