Uh oh!
There was an error while loading. Please reload this page.
fix: preserve openai-compatible reasoning_effort option - #76
Conversation
There was a problem hiding this comment.
Review notes (not line-anchored)
- [CONSISTENCY] Incomplete test coverage for reasoning_effort variants — The test only covers the case where both
reasoningEffortandreasoning_effortare provided simultaneously, asserting snake_case priority. It does not verify the fallback path where onlyreasoningEffort(camelCase) is provided — if the implementation is supposed to normalize camelCase to snake_case, that path is untested and could silently break. Likewise, the standalonereasoning_effort(snake_case only) case is not covered. At minimum, add two tests: one passing onlyreasoningEffort: 'high'asserting the expected body key/value, and one passing onlyreasoning_effort: 'none'to confirm it passes through unchanged.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Now let me check sibling files for consistency patterns before dispatching per-file subagents.Let me dispatch the per-file subagents now.Now let me save the findings and merge them.Now let me record the review and submit it.Now let me record the findings and complete the review.2 inline comment(s) + 1 PR-level note(s) posted on PR #76. Findings summary: Duplicate Code
Test Coverage Gap (body note)
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
byapparov
commented
Jun 10, 2026
Test coverage gap addressed in 1494c22: added snake_case-only and camelCase-only cases alongside the existing both-set precedence test, and documented the alias/precedence relationship in the options JSDoc. The |
Uh oh!
There was an error while loading. Please reload this page.
The publish workflow stamps AICTRL_VERSION only into platform binary manifests, so the main package.json must be bumped manually before tagging or the @aictrl/cli publish is a tolerated already-published no-op (see #74 post-mortem). util and sdk are unchanged since v0.3.5 and keep their versions. Refs #76 Co-authored-by: Bulat Yapparov <by4pparov@yandex.ru> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Summary
Addresses the snake_case provider-option path from #75.
@ai-sdk/openai-compatiblerequest construction filteredreasoning_effortout of provider options because onlyreasoningEffortwas in the parsed schema, then wrotereasoning_effortfrom the camelCase value. That made an explicitreasoning_effort: "none"no-op for OpenAI-compatible endpoints such as Ollama's/v1/chat/completions.This change:
reasoning_effortin the openai-compatible provider options schemareasoning_effort ?? reasoningEffortValidation
bun test test/provider/copilot/copilot-chat-model.test.tsbun run typecheckgit diff --check