Repository navigation
Use NVIDIA Nemotron 3.5 Lightning (free) on OpenRouter, with reasoning - #2
Merged
Merged
Conversation
The openrouter preset now leads both its analyze and codegen chains with
nvidia/nemotron-3.5-lightning:free, the model chosen for drawing concept
diagrams, and sends `reasoning: {"enabled": true}` (LLM_REASONING=0 turns it
off). The paid long-context models stay behind it as fallbacks.
Two free-endpoint failure modes are handled instead of failing the call:
- under require_parameters, a free host without response_format support
answers 404 "No endpoints found that can handle the requested parameters";
that call is retried with the schema in the prompt on the same model;
- a withdrawn free endpoint (404 "No endpoints found for <model>") moves on to
the next model in the chain.
Every pipeline call is a single turn, so there are no reasoning_details to
pass back between requests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BgiEmhLGtyG2FWJkiiwD1M
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94c13ac09b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
OpenRouter caps ':free' models per day and answers 429 "Rate limit exceeded: free-models-per-day". That body does not match is_daily_limit, so the shared handler treated it as a per-minute limit and retried until it raised — never a ModelUnavailable, so the paid models later in the chain were never tried and every analyze/codegen call failed once the free quota ran out. A `_model_exhausted` hook now runs on every 429; LongContextProvider raises ModelUnavailable for a ':free' model whose 429 says "per-day", so the chain moves on and skips the spent model for the rest of the process. Per-minute 429s and paid models' daily limits behave as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BgiEmhLGtyG2FWJkiiwD1M
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openrouterpreset now leads both its analyze and codegen chains withnvidia/nemotron-3.5-lightning:free, the model chosen for drawing concept diagrams.reasoning: {"enabled": true};LLM_REASONING=0turns this off. The paid long-context models stay behind Nemotron as fallbacks.reasoning_detailsto pass back between requests.Free-endpoint failures, handled instead of failing the call
require_parametersset, OpenRouter answers 404 "No endpoints found that can handle the requested parameters" when no free host for the model supportsresponse_format. That call is now retried with the schema in the prompt, on the same model. Before this change the 404 failed the whole call, so this fix has to be merged before production moves to OpenRouter.Deployment context
The production env vars on
arcvisual-apiare already set:ARCVISUAL_PROVIDER=openrouterOPENROUTER_API_KEY(stored as a sensitive variable)LLM_MODEL_CLASSIFY/LLM_MODEL_CODEGENpinned to the Nemotron-first chainThe current production deployment is built from
457e11e, which predates the long-context provider. Once this is merged,mainneeds a production deploy.Verification
pytestpasses; there are 5 new tests intests/test_longcontext.py:ruff checkandruff format --checkare clean.Not verified: no live call has been made to OpenRouter, because the development environment's network policy blocks
openrouter.ai.Generated by Claude Code