Repository navigation
test(e2e): add live Fireworks AI chat completions coverage - #33975
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
|
Greptile SummaryThis PR adds live end-to-end coverage for the Fireworks AI chat completions path, filling the gap that let the b3d05bd
Confidence Score: 5/5Safe to merge — all changes are confined to the e2e test directory and coverage registry; no production code is touched. The three new tests faithfully follow the established harness conventions: per-test provisioning via _provision, teardown through resources.defer, unique markers to avoid cache collisions, typed Pydantic bodies, and unwrap for hard failure on any non-success response. Registry cell IDs align exactly with the @pytest.mark.covers declarations, the LlmRoute Literal extension is minimal and correct, and the CLAUDE.md grammar comment stays in sync. No monkeypatching, no raw requests imports, and no xfail markers. No files require special attention.
|
| Filename | Overview |
|---|---|
| tests/e2e/llm_translation/test_fireworks_ai_e2e.py | New live e2e test file covering Fireworks AI chat completions (non-streaming content, cost logging, and streaming). Follows harness conventions correctly: per-test resource provisioning, unique markers, typed bodies, and teardown via resources.defer. |
| tests/e2e/coverage_registry/llm_conversational.yaml | Adds three P0 registry cells for Fireworks AI (nonstream.works with fail_before_fix:proven, stream.works, nonstream.cost_logged); cell IDs match the @pytest.mark.covers declarations in the test file. |
| tests/e2e/coverage_registry/schema.py | Adds fireworks_ai to the LlmRoute Literal; minimal, correct schema extension. |
| tests/e2e/CLAUDE.md | Adds fireworks_ai to the route grammar comment; keeps docs in sync with the schema change. |
Reviews (1): Last reviewed commit: "test(e2e): add live Fireworks AI chat co..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Closing as stale: no activity in the last 30 days. Feel free to reopen if this is still relevant. |
Relevant issues
Follow-up to the Fireworks 415 regression from b3d05bd (#33717). The fix itself ships in a separate PR; this PR adds the e2e coverage that would have caught it
Linear ticket
Pre-Submission checklist
Screenshots / Proof of Fix
The Fireworks provider had no live e2e coverage, only mocked SDK/translation unit tests that patch the HTTP handler and never send a real request, so nothing exercised the header + serialization path that b3d05bd broke. These three tests drive a real
fireworks_ai/accounts/fireworks/models/kimi-k2p6chat completion through a live proxy and cost real moneyBefore, against the current buggy staging (commit
bd44c9e305), all three fail with the exact upstream 415:After, with the one-line fix applied on top of
bd44c9e305(restoreContent-Type: application/jsoninFireworksAIMixin.validate_environment), all three pass against the same live proxy:The proxy ran locally against a real Postgres with
store_model_in_db, each test registered its deployment via/model/newand deleted it on teardown, and the cost test polled/spend/logsfor a costed row keyed on the completion idType
✅ Test
Changes
tests/e2e/llm_translation/test_fireworks_ai_e2e.pycovers OpenAI-format/chat/completionstranslated to the Fireworks provider: a non-streaming call returns content, its cost lands on a spend row taggedcustom_llm_provider="fireworks_ai", and a streaming call returns SSE events with no in-stream error. Any of these is enough to catch a droppedContent-Typeheader, since Fireworks 415s the request before a completion comes backThe coverage registry gains three
llm.chat_completions.fireworks_ai.basic.*cells (the non-streamingworkscell is markedfail_before_fix: proven), andfireworks_aijoins theLlmRoutevocab incoverage_registry/schema.pyand the route grammar intests/e2e/CLAUDE.mdQA runbook
Prerequisites: a live proxy on
:4000withstore_model_in_db: trueand a Postgres,FIREWORKS_AI_API_KEYin the proxy env, master keysk-1234. Modelaccounts/fireworks/models/kimi-k2p6must be deployed on the Fireworks account (adjustBACKEND_MODELif the account serves a different model)tests/e2e/llm_translation/test_fireworks_ai_e2e.py::TestFireworksAIChatCompletions::test_basic_chat_completion_returns_content - a Fireworks-backed deployment serves a real non-streaming chat completion with non-empty content
tests/e2e/llm_translation/test_fireworks_ai_e2e.py::TestFireworksAIChatCompletions::test_basic_chat_completion_logs_cost - the same call writes a costed spend row attributed to the Fireworks provider
tests/e2e/llm_translation/test_fireworks_ai_e2e.py::TestFireworksAIChatCompletions::test_streaming_chat_completion_returns_content - a streaming Fireworks chat completion returns SSE events with no in-stream error
Final Attestation
Link to Devin session: https://app.devin.ai/sessions/678fef34cdf049ed9e8fbadc3c65ac35
Requested by: @krrish-berri-2