Repository navigation
fix(cost_map): mark fireworks_ai/minimax-m3 as vision and pin capabilities verified against live calls - #43390
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
…ities verified against live calls Fireworks' serverless minimax-m3 answers image inputs, but its model listings say supports_image_input false, so the last two registry syncs flipped supports_vision back to false and the Fireworks pre-flight turned every image request into a 400 without ever calling the provider. Flip both minimax-m3 rows back to supports_vision true and record the live-call evidence in ci_cd/cost_map_pins.json. The cost map guard now fails any PR that lowers a pinned capability, quoting the evidence, and the sync bot may not touch the pins file.
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| if not pins_text: | ||
| return (f"{PINS_PATH} is missing; restore it, its pins were verified against live provider calls",) |
| def test_main_fails_a_pr_that_deletes_the_pins_file(tmp_path: Path) -> None: | ||
| subprocess.run(("git", "init", "-q", str(tmp_path)), check=True) | ||
| base: Final = _commit(tmp_path, BASE_MAP, "base", pins=PINS) | ||
| subprocess.run(("git", "rm", "-q", guard.PINS_PATH), cwd=tmp_path, check=True) |
There was a problem hiding this comment.
Unit test runs subprocesses This new deletion test runs git subprocesses, but
tests/unit requires in-process tests with no subprocesses. That repository requirement must be satisfied before merging.
Context Used: AGENTS.md (source)
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!
TLDR
Problem this solves:
fireworks_ai/minimax-m3get a LiteLLM 400 before Fireworks is calledsupports_vision: false, copied from Fireworks' model listingHow it solves it:
minimax-m3cost map rows go back tosupports_vision: trueci_cd/cost_map_pins.jsonrecords the live-call evidence for that flagUser Flow
Before: a developer whose app sends screenshots to
fireworks_ai/minimax-m3through the proxy gets a 400 from LiteLLM before Fireworks is ever calledfireworks_ai/accounts/fireworks/models/minimax-m3to the config asfireworks-minimax-m3and starts the proxyfireworks-minimax-m3and one user message holding a text block plus animage_urlblockFireworks AI model accounts/fireworks/models/minimax-m3 does not support image inputs. Use a Fireworks vision model or remove image_url content blocks.and Fireworks never sees the requestsupports_vision: falsefor the deployment, and a later cost map sync can flip it back to false even after someone fixes it by handAfter: the same request reaches Fireworks and comes back with the image read, and no sync can flip the flag back
fireworks_ai/accounts/fireworks/models/minimax-m3to the config asfireworks-minimax-m3and starts the proxyfireworks-minimax-m3and one user message holding a text block plus animage_urlblockdigit=7, shape=circle, color=redfor the probe image), billed at the usual minimax-m3 token pricessupports_vision: truefor the deploymentPre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
Shared setup for both legs: a worktree at the named commit with its own venv,
proxy_config.yamlas below with the real Fireworks key, booted withLITELLM_LOCAL_MODEL_COST_MAP=True litellm --config proxy_config.yaml --num_workers 2 --port <random free port>so each leg reads its own commit's cost map (the hostedmainmap still saysfalseuntil this merges). No database. The probe is a 512x512 PNG with a large7and a small red circle, sent the same way through all three endpoints:proxy_request.jsoncarries it as adata:image/png;base64image_urlblock,messages_request.jsonas a base64imagesource block,responses_request.jsonas aninput_imagedata URL. The sync commit for the guard case,fb2bae5a, is the PR tip withsupports_visionset back tofalseon bothminimax-m3rows in both cost map files (a 4-line diff), checked under a bot branch name.Before (b248b1c)
Proxy booted from a worktree at
b248b1c7dcon port 35188, 2 uvicorn workers.Image to fireworks-minimax-m3 through /v1/chat/completions
Run
Observed
Image to fireworks-minimax-m3 through /v1/messages
Run
Observed
Image to fireworks-minimax-m3 through /v1/responses
Run
Observed
Control: the same image to fireworks-kimi-k3 through /v1/chat/completions
Run
Observed
What /model/info reports for both deployments
Run
Observed
The cost map guard at this commit checking a sync commit that flips minimax-m3 back to no-vision
Run
Observed
After (e5cc50e)
Proxy booted from a worktree at
e5cc50e7fcon port 56311, 2 uvicorn workers.Image to fireworks-minimax-m3 through /v1/chat/completions
Run
Observed
Image to fireworks-minimax-m3 through /v1/messages
Run
Observed
Image to fireworks-minimax-m3 through /v1/responses
Run
Observed
Control: the same image to fireworks-kimi-k3 through /v1/chat/completions
Run
Observed
What /model/info reports for both deployments
Run
Observed
The cost map guard at this commit checking a sync commit that flips minimax-m3 back to no-vision
Run
Observed
Observations from the run:
/v1/responsesanswered the image at the merge base too; this PR leaves that alonesupports_image_input: false; this PR leaves that aloneType
🐛 Bug Fix
Caveats (if any)
Medium
Low
/inference/v1/modelsand/v1/serverless/modelsstill say no image input for minimax-m3 (checked 2026-09-26); the pin is what keeps the map from following themLive regression check
Verdict: no dependent path regressed. Base (
b248b1c7dc) and head were driven through the same proxy config, 2 uvicorn workers, no database, with a forwarding recorder in front ofhttps://api.fireworks.aion both sides, and the only outbound differences are the three requests the base rejected before calling FireworksBreaking
user-agentare dropped, the header key sets match (accept,authorization,content-type,user-agent), and every request went out exactly onceuser-agentreadslitellm/unknownon base andlitellm/1.104.0on head because the base venv was built with--no-install-project; the first head run had a database attached through a stray.envin the worktree and was redone without it, so both legs are no-databaseBackward incompatible
supports_visionon bothfireworks_ai/minimax-m3keys goes false -> true and every reader moves with it:litellm.get_model_info()in-process,GET /model/infoandGET /model_group/infoon the proxy, and the Fireworks pre-flight inlitellm/llms/fireworks_ai/chat/transformation.py, which no longer answers 400 forimage_urlcontent on/v1/chat/completions(stream and non-stream) and/v1/messages. Those three requests now reach Fireworks carrying exactly one image part each and get billed (519 prompt tokens on the probe); a caller that leaned on the 400 to keep images away from this model now gets a 200litellm_cost_map_sync_*PR that lowers a pinned flag fails with the pin's evidence (observed on the minted sync commit, exit 1 with both pin messages), one that editsci_cd/cost_map_pins.jsonfails, and a human PR that deletes the pins file fails (Greptile's finding, fixed ine5cc50e7fc, covered bytest_main_fails_a_pr_that_deletes_the_pins_file, which runs the script as a subprocess). The workflow runs base-branch code, so all of this bites only on PRs opened after this mergesRegression risk
Dependency graph
/v1/chat/completionsimage, stream and non-stream/v1/messagesimage/v1/responsesimage/model/info,/model_group/infolitellm.get_model_infoin both venvs/v1/chat/completionsimage/v1/chat/completionstests/unit/test_cost_map_guard.py.github/workflows/cost-map-guard.ymltests/unit/llms/fireworks_aiMerge-ref:
mainmoved from the merge baseb248b1c7dctoe73abe6c72since the branch point and has not moved since. A merged tree (1216bd66ontoe73abe6c72) served the image chat and messages requests with 200 and reportssupports_vision: true, andmain's guard passes that merge while failing a follow-up sync that lowers the flag. The one commit since,e5cc50e7fc, touches only the guard script and its tests, which the proxy never importsNot verified
run-ciis not added on weekends, so it runs Monday/v1/messagesand/v1/responseswith the image (only chat streaming was run)supports_visionfor this deployment (the field's type is unchanged, only its value)LITELLM_LOCAL_MODEL_COST_MAP=True)Final Attestation