Skip to content

fix(processors): treat Fireworks model ids as reasoning-hint incompatible#123

Open
himorishige wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
himorishige:fix/reasoning-hint-fireworks-tag
Open

fix(processors): treat Fireworks model ids as reasoning-hint incompatible#123
himorishige wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
himorishige:fix/reasoning-hint-fireworks-tag

Conversation

@himorishige

@himorishige himorishige commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Fixes the classifier half of #121.

What

Fireworks AI's OpenAI-compatible API validates request bodies strictly and rejects the vLLM chat_template_kwargs hint with HTTP 400 (Extra inputs are not permitted, field: 'chat_template_kwargs'). Fireworks model ids always carry the provider namespace (accounts/fireworks/models/...), so this PR adds fireworks to _NO_REASONING_HINT_TAGS.

With this, the LLM classifier's disable_reasoning auto-detect stops injecting the hint for Fireworks-served classifier models, and — combined with #122 — deterministic tier calls stop injecting it as well.

Validation

  • Parametrized deny-list cases extended with three Fireworks ids (deepseek-v4-flash, deepseek-v4-pro, glm-5p2); tests/test_reasoning_hint.py 13 passed.
  • Real-world check: with the deny list patched this way, a deterministic profile with a Fireworks-hosted classifier (accounts/fireworks/models/deepseek-v4-flash) classifies successfully end to end (main @ 060ad758, Fireworks serverless).

Summary by CodeRabbit

  • Bug Fixes
    • Improved compatibility with Fireworks-served models by preventing unsupported reasoning hints that could cause request failures.
    • Added coverage for additional DeepSeek and GLM model variants.

…ible

Fireworks AI's OpenAI-compatible API validates request bodies strictly
and rejects the vLLM chat_template_kwargs hint with HTTP 400 ("Extra
inputs are not permitted, field: 'chat_template_kwargs'"). Fireworks
model ids always carry the provider namespace
(accounts/fireworks/models/...), so extend the deny list used by
model_accepts_reasoning_hint() to match them.

This stops the LLM classifier's disable_reasoning auto-detect from
injecting the hint at Fireworks-served classifier models, and — once
the DeepSeek tier overrides consult the same check — deterministic
tier calls as well.

Signed-off-by: Hiroshi Morishige <hiroshi.morishige@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The reasoning hint compatibility check now rejects model IDs containing "fireworks", documents the associated HTTP 400 behavior, and tests DeepSeek and GLM Fireworks model identifiers.

Changes

Reasoning Hint Compatibility

Layer / File(s) Summary
Fireworks model rejection and coverage
switchyard/lib/processors/reasoning_hint.py, tests/test_reasoning_hint.py
The reasoning-hint blocklist includes "fireworks", and parameterized tests verify rejection for three Fireworks-served model IDs.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

A rabbit found a hint in flight,
Then Fireworks made the answer “no” just right.
DeepSeek and GLM joined the test,
The blocklist now knows them best.
Hop, hop—HTTP four-hundred rests!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: marking Fireworks model IDs as incompatible with the reasoning hint.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
tests/test_reasoning_hint.py (1)

21-23: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Rename the parametrized test to cover Fireworks models.

The test now covers more than the Claude family, so test_claude_family_rejects_hint is misleading. Rename it to a provider-neutral name such as test_models_rejecting_reasoning_hint.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_reasoning_hint.py` around lines 21 - 23, Rename the parametrized
test function test_claude_family_rejects_hint to a provider-neutral name such as
test_models_rejecting_reasoning_hint, keeping its existing parameters and
assertions unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@tests/test_reasoning_hint.py`:
- Around line 21-23: Rename the parametrized test function
test_claude_family_rejects_hint to a provider-neutral name such as
test_models_rejecting_reasoning_hint, keeping its existing parameters and
assertions unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ecfbcbb0-16db-4487-b250-1d290351914a

📥 Commits

Reviewing files that changed from the base of the PR and between 060ad75 and ab29944.

📒 Files selected for processing (2)
  • switchyard/lib/processors/reasoning_hint.py
  • tests/test_reasoning_hint.py

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