Skip to content

feat(core): add Fireworks AI as an LLM provider#851

Open
sam-notte wants to merge 2 commits into
mainfrom
feat/fireworks-llm-provider
Open

feat(core): add Fireworks AI as an LLM provider#851
sam-notte wants to merge 2 commits into
mainfrom
feat/fireworks-llm-provider

Conversation

@sam-notte

@sam-notte sam-notte commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Fireworks AI as a supported LLM provider in notte-core, with three LlmModel aliases for the Fireworks-hosted models validated in the joint Notte × Fireworks benchmark (Kimi K2.5, GLM-5, MiniMax M2.5).

Why

Companion to the Fireworks docs PR at #846, which documents the integration and uses reasoning_model strings of the form fireworks_ai/accounts/fireworks/models/<slug>. Without this change, the cloud rejects those strings at /agents/start with a 422 because the LlmProvider enum has no fireworks_ai entry, so LlmModel.get_provider() raises and the validator returns "not supported."

Empirically confirmed by running agent.run() against the cloud with reasoning_model="fireworks_ai/accounts/fireworks/models/kimi-k2p5":

422: Model 'fireworks_ai/accounts/fireworks/models/kimi-k2p5' is not supported. Available models are: {openai/gpt-4o, ..., moonshot/kimi-k2.5, minimax/minimax-m2.5, ...}

Cloud validation reads its allowlist via LlmModel.valid() in this same file, so this single SDK change unlocks the docs example once the package is deployed and FIREWORKS_API_KEY is set in the cloud's environment.

Diff

packages/notte-core/src/notte_core/common/config.py:

  • LlmProvider.fireworks_ai = "fireworks_ai"
  • apikey_name match arm returning "FIREWORKS_API_KEY"
  • Three LlmModel aliases:
    • fireworks_kimi_k2p5 = "fireworks_ai/accounts/fireworks/models/kimi-k2p5"
    • fireworks_glm_5 = "fireworks_ai/accounts/fireworks/models/glm-5"
    • fireworks_minimax_m2p5 = "fireworks_ai/accounts/fireworks/models/minimax-m2p5"
  • Adds fireworks_ai to unsupported_providers in use_strict_response_format, matching the benchmark configuration (which used non-strict json_object)

Cloud requirement

After merge + redeploy, the cloud needs FIREWORKS_API_KEY set in its production environment for these models to appear in LlmModel.valid(). Without that env var, has_apikey_in_env() filters them out.

Naming

The model aliases (fireworks_kimi_k2p5, fireworks_glm_5, fireworks_minimax_m2p5) follow the convention of prefixing with the provider to avoid collision with the existing kimi2_5 (Moonshot direct) and minimax (MiniMax direct) entries. Happy to rename to any preferred convention.

Test plan

  • CI passes (syntax, type check, unit tests)
  • After merge + cloud redeploy with FIREWORKS_API_KEY set, agent.run(reasoning_model="fireworks_ai/accounts/fireworks/models/kimi-k2p5") succeeds against the cloud
  • Docs PR docs: add Fireworks AI integration page #846 example renders and runs end to end

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added support for Fireworks AI as an LLM provider
    • Added three new Fireworks models: Kimi K2.5, GLM 5, and Minimax M2.5
  • Behavior Changes

    • Fireworks-backed models no longer enforce the strict response format
    • Kimi K2.5 model has a temperature override set to 1.0
  • Tests

    • Added tests validating Fireworks provider registration and model behaviors

Adds Fireworks AI as a supported LLM provider in notte-core, with three
model aliases for the Fireworks-hosted models validated in the joint
benchmark (Kimi K2.5, GLM-5, MiniMax M2.5).

Changes to packages/notte-core/src/notte_core/common/config.py:
- LlmProvider.fireworks_ai = "fireworks_ai"
- apikey_name case returning "FIREWORKS_API_KEY"
- Three LlmModel entries for the benchmark models
- Adds fireworks_ai to unsupported_providers in
  use_strict_response_format (matches the benchmark configuration,
  which used non-strict json_object)

Companion to the docs PR at #846, which uses these model strings in
the published Fireworks integration page.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This PR registers Fireworks AI as LlmProvider.fireworks_ai, maps its apikey_name to FIREWORKS_API_KEY, adds three Fireworks-backed LlmModel entries (fireworks_kimi_k2p5, fireworks_glm_5, fireworks_minimax_m2p5), marks the provider as unsupported for strict response-format enforcement, adds a kimi-k2p5 temperature override, and introduces tests validating provider registration, apikey mapping, provider resolution, non-strict formatting, and the temperature override.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • nottelabs/notte#674: Both PRs update the LlmProvider and LlmModel enums in config.py by adding new providers and adjusting strict response-format capability constraints.
  • nottelabs/notte#475: Both PRs extend LlmProvider and the apikey_name environment variable mapping in the shared configuration file.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and concisely describes the main change: adding Fireworks AI as a new LLM provider to notte-core.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/fireworks-llm-provider

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@greptile-apps

greptile-apps Bot commented Jun 10, 2026

Copy link
Copy Markdown

Greptile Summary

This PR registers Fireworks AI as a new LlmProvider and adds three LlmModel aliases for Fireworks-hosted Kimi K2.5, GLM-5, and MiniMax M2.5, fixing the 422 rejection that occurred when these model strings were passed to the cloud endpoint.

  • Adds LlmProvider.fireworks_ai with FIREWORKS_API_KEY lookup, three LlmModel enum values, and excludes fireworks_ai from use_strict_response_format.
  • The Fireworks kimi model uses the slug kimi-k2p5 (. \u2192 p) but the existing get_temperature override pattern is \"kimi-k2.5\", so it won\u2019t match and the model will run at the wrong temperature.
  • No tests are included for the new provider or models.

Confidence Score: 3/5

The change is small and mostly additive, but the kimi temperature mismatch will cause the Fireworks-hosted Kimi model to silently behave differently from both its Moonshot counterpart and the benchmark configuration.

The get_temperature override pattern kimi-k2.5 does not match the Fireworks slug kimi-k2p5, so fireworks_kimi_k2p5 will run at the caller default temperature rather than 1.0. The override was explicitly set for this model family, making the miss a real behavioral regression. No tests were added to catch this.

packages/notte-core/src/notte_core/common/config.py — specifically the get_temperature method and the absence of tests for the new provider.

Important Files Changed

Filename Overview
packages/notte-core/src/notte_core/common/config.py Adds Fireworks AI provider enum, API key mapping, three model aliases, and use_strict_response_format exclusion. The get_temperature override for kimi-k2p5 is missing — the slug uses p5 instead of .5 so the existing kimi-k2.5 pattern won't match. No tests added.

Comments Outside Diff (1)

  1. packages/notte-core/src/notte_core/common/config.py, line 241-243 (link)

    P1 The get_temperature override pattern "kimi-k2.5" won't match the Fireworks model slug "kimi-k2p5" (dots replaced with p for URL safety). As a result, fireworks_kimi_k2p5 will silently use the caller-supplied default temperature instead of 1.0, diverging from both the Moonshot-hosted version and the benchmark configuration.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: packages/notte-core/src/notte_core/common/config.py
    Line: 241-243
    
    Comment:
    The `get_temperature` override pattern `"kimi-k2.5"` won't match the Fireworks model slug `"kimi-k2p5"` (dots replaced with `p` for URL safety). As a result, `fireworks_kimi_k2p5` will silently use the caller-supplied default temperature instead of `1.0`, diverging from both the Moonshot-hosted version and the benchmark configuration.
    
    
    
    How can I resolve this? If you propose a fix, please make it concise.

    Fix in Claude Code

Fix All in Claude Code

Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
packages/notte-core/src/notte_core/common/config.py:241-243
The `get_temperature` override pattern `"kimi-k2.5"` won't match the Fireworks model slug `"kimi-k2p5"` (dots replaced with `p` for URL safety). As a result, `fireworks_kimi_k2p5` will silently use the caller-supplied default temperature instead of `1.0`, diverging from both the Moonshot-hosted version and the benchmark configuration.

```suggestion
        temperature_overrides: dict[str, float] = {
            "kimi-k2.5": 1.0,
            "kimi-k2p5": 1.0,
        }
```

### Issue 2 of 2
packages/notte-core/src/notte_core/common/config.py:150-152
No unit or integration tests accompany this change. Per the repository's test guidelines, every major feature addition should include at least one integration test — for example, verifying that `LlmModel.get_provider("fireworks_ai/accounts/fireworks/models/kimi-k2p5")` returns `LlmProvider.fireworks_ai`, that `use_strict_response_format` returns `False` for these models, and that `get_temperature` applies the correct override for `fireworks_kimi_k2p5`.
- Add a comment if the PR does n... ([source](https://app.greptile.com/review/custom-context?memory=instruction-0))

Reviews (1): Last reviewed commit: "feat(core): add Fireworks AI as an LLM p..." | Re-trigger Greptile

Comment on lines +150 to +152
fireworks_kimi_k2p5 = "fireworks_ai/accounts/fireworks/models/kimi-k2p5"
fireworks_glm_5 = "fireworks_ai/accounts/fireworks/models/glm-5"
fireworks_minimax_m2p5 = "fireworks_ai/accounts/fireworks/models/minimax-m2p5"

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 No unit or integration tests accompany this change. Per the repository's test guidelines, every major feature addition should include at least one integration test — for example, verifying that LlmModel.get_provider("fireworks_ai/accounts/fireworks/models/kimi-k2p5") returns LlmProvider.fireworks_ai, that use_strict_response_format returns False for these models, and that get_temperature applies the correct override for fireworks_kimi_k2p5.

Context Used: # Test guidelines

  • Add a comment if the PR does n... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/notte-core/src/notte_core/common/config.py
Line: 150-152

Comment:
No unit or integration tests accompany this change. Per the repository's test guidelines, every major feature addition should include at least one integration test — for example, verifying that `LlmModel.get_provider("fireworks_ai/accounts/fireworks/models/kimi-k2p5")` returns `LlmProvider.fireworks_ai`, that `use_strict_response_format` returns `False` for these models, and that `get_temperature` applies the correct override for `fireworks_kimi_k2p5`.

**Context Used:** # Test guidelines
- Add a comment if the PR does n... ([source](https://app.greptile.com/review/custom-context?memory=instruction-0))

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code

Two fixes:

1. Add "kimi-k2p5" to the get_temperature override dict so the
   Fireworks-hosted Kimi K2.5 picks up the same 1.0 temperature as
   the Moonshot-hosted version. The original entry only matched the
   "kimi-k2.5" slug (with dot), not the URL-safe "kimi-k2p5" slug
   that Fireworks uses.

2. Add tests/config/test_fireworks_provider.py covering:
   - LlmProvider.fireworks_ai registration and apikey_name
   - LlmModel.get_provider resolution for the new aliases
   - use_strict_response_format returns False for Fireworks models
   - get_temperature override applies to fireworks_kimi_k2p5 with
     parity to kimi2_5 (validates the fix above)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

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

Actionable comments posted: 2

🤖 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.

Inline comments:
In `@tests/config/test_fireworks_provider.py`:
- Line 1: Reformat the import statement so Ruff/isort accepts it: replace the
single-line "from notte_core.common.config import LlmModel, LlmProvider" with a
properly sorted and wrapped import (alphabetical order) using parentheses or
one-per-line style, e.g. "from notte_core.common.config import (LlmModel,
LlmProvider)" or separate lines, ensuring LlmModel and LlmProvider are
alphabetized; this will satisfy Ruff I001.
- Around line 16-17: The test contains a raw secret-like string literal causing
detect-secrets to fail; update the test_test_fireworks_provider_apikey_name
(function test_fireworks_provider_apikey_name) to either replace the hardcoded
literal with a constructed value (e.g., join or format the parts) or add an
explicit detect-secrets allowlist pragma for that assertion, ensuring the
assertion still verifies LlmProvider.fireworks_ai.apikey_name equals
"FIREWORKS_API_KEY" but does not present a raw secret token to the scanner.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e0fa6ce8-bd4b-4267-9561-f119bbc3d5cf

📥 Commits

Reviewing files that changed from the base of the PR and between aafbc32 and 6407803.

📒 Files selected for processing (2)
  • packages/notte-core/src/notte_core/common/config.py
  • tests/config/test_fireworks_provider.py

@@ -0,0 +1,38 @@
from notte_core.common.config import LlmModel, LlmProvider

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix import block formatting to unblock Ruff.

CI is failing on Ruff I001 at Line 1; please apply Ruff/isort formatting for this import block.

🧰 Tools
🪛 GitHub Actions: pytest cicd / 0_tests.txt

[error] 1-1: ruff check (hook id: ruff-check) failed: I001 Import block is un-sorted or un-formatted. Organize imports. (1 error; fixable with --fix)

🪛 GitHub Actions: pytest cicd / tests

[error] 1-1: Ruff (ruff-check) failed: I001 Import block is un-sorted or un-formatted. Organize imports. Hook id: ruff-check, exit code: 1.

🤖 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/config/test_fireworks_provider.py` at line 1, Reformat the import
statement so Ruff/isort accepts it: replace the single-line "from
notte_core.common.config import LlmModel, LlmProvider" with a properly sorted
and wrapped import (alphabetical order) using parentheses or one-per-line style,
e.g. "from notte_core.common.config import (LlmModel, LlmProvider)" or separate
lines, ensuring LlmModel and LlmProvider are alphabetized; this will satisfy
Ruff I001.

Source: Pipeline failures

Comment on lines +16 to +17
def test_fireworks_provider_apikey_name():
assert LlmProvider.fireworks_ai.apikey_name == "FIREWORKS_API_KEY"

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Resolve detect-secrets failure on the API key literal.

CI flags this test at Line 16 as a secret-keyword hit. Add an explicit allowlist pragma for this intentional test literal (or rewrite the assertion to avoid a raw secret-like token) so pre-commit passes.

Suggested minimal fix
 def test_fireworks_provider_apikey_name():
-    assert LlmProvider.fireworks_ai.apikey_name == "FIREWORKS_API_KEY"
+    assert LlmProvider.fireworks_ai.apikey_name == "FIREWORKS_API_KEY"  # pragma: allowlist secret
🧰 Tools
🪛 GitHub Actions: pytest cicd / 0_tests.txt

[error] 16-16: detect-secrets (hook id: detect-secrets) failed: Potential secrets about to be committed to git repo. Secret Type: Secret Keyword. Location: tests/config/test_fireworks_provider.py:16

🪛 GitHub Actions: pytest cicd / tests

[error] 16-16: detect-secrets failed (exit code: 1): Potential secrets about to be committed to git repo. Secret Type: Secret Keyword. Location: tests/config/test_fireworks_provider.py:16.

🤖 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/config/test_fireworks_provider.py` around lines 16 - 17, The test
contains a raw secret-like string literal causing detect-secrets to fail; update
the test_test_fireworks_provider_apikey_name (function
test_fireworks_provider_apikey_name) to either replace the hardcoded literal
with a constructed value (e.g., join or format the parts) or add an explicit
detect-secrets allowlist pragma for that assertion, ensuring the assertion still
verifies LlmProvider.fireworks_ai.apikey_name equals "FIREWORKS_API_KEY" but
does not present a raw secret token to the scanner.

Source: Pipeline failures

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