Skip to content

Fix Inkling reasoning-effort coercion for duck-typed engine stand-ins - #7158

Merged
danielhanchen merged 3 commits into
mainfrom
fix-effort-coercion
Jul 16, 2026
Merged

danielhanchen merged 3 commits into
mainfrom
fix-effort-coercion

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Follow-up to #7153. The reasoning-effort name-to-number coercion landed as a bound method, but the DeepSeek thinking-effort tests drive _request_reasoning_kwargs with a SimpleNamespace engine stand-in, which fails with AttributeError. Move the mapping to a module-level helper so any duck-typed caller works. Behavior unchanged; the thinking-effort suite and server-args tests pass.

@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 _INKLING_REASONING_EFFORT mapping and the _coerce_reasoning_effort helper function from instance-level attributes of LlamaCppBackend to module-level definitions. This change allows duck-typed engine stand-ins in tests to utilize reasoning effort coercion without requiring the class attributes. I have no feedback to provide as there are no review comments to evaluate.

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a4326fe8e1

ℹ️ 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".

# so duck-typed engine stand-ins in tests do not need the attribute.
_INKLING_REASONING_EFFORT = {
"none": 0.0,
"minimal": 0.1,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore Inkling minimal effort to low

For Inkling models, a request with reasoning_effort="minimal" now gets coerced to 0.1, whereas before this refactor it was mapped to the same trained value as low (0.2). Since the rest of the change is only moving the helper to support duck-typed callers and the commit claims behavior is unchanged, this accidentally weakens any OpenAI-style minimal-effort request routed through the Inkling numeric template.

Useful? React with 👍 / 👎.

@danielhanchen
danielhanchen merged commit 030f127 into main Jul 16, 2026
47 of 49 checks passed
@danielhanchen
danielhanchen deleted the fix-effort-coercion branch July 16, 2026 13:23
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