fix(openrouter-models): stop treating output limit as throughput - #178
Open
yazcaleb wants to merge 2 commits into
Open
fix(openrouter-models): stop treating output limit as throughput#178yazcaleb wants to merge 2 commits into
yazcaleb wants to merge 2 commits into
Conversation
max_completion_tokens is capacity, not tokens/sec. Reject legacy model-level speed and throughput sorts and direct users to live endpoint performance data. Fixes OpenRouterTeam#13
Put two endpoints in reverse throughput order within one model fixture. The regression test now fails if endpoint throughput sorting is removed or reversed.
Author
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.
Problem
list-models.tsandcompare-models.tsaccepted--sort speedand--sort throughput, but ranked models bytop_provider.max_completion_tokens. That field is an output-capacity limit, not generation speed, so the commands silently returned the wrong ordering.Closes #13
Root cause
The model list response does not contain tokens-per-second performance data. Actual throughput is live and provider-specific under
GET /models/{id}/endpoints.Changes
get-endpoints.ts --sort throughputSKILL.mdguidance aligned on the supported sort modesTesting
npm cinpm test(6 tests)git diff --checkRegression risk
Low. Existing newest, price, and context sorting is unchanged. The intentional compatibility change is that the two misleading sort names now fail with an actionable error instead of returning a false ranking.
Live acceptance
main,list-models.ts --sort throughputreturned 415 live models with a zero exit code. The first models had a 1,800,000-token output limit.main,compare-models.ts ... --sort speedplaced the 1,800,000-token model before the 16,384-token model. On this branch, it rejects that false comparison.list-models.ts --sort contextfetched 415 live models and returned them in descending context-length order.throughput_last_30mvalues were null, so a numeric live throughput order was not available to observe. The deterministic endpoint fixture covers that data case.Installed acceptance
gh skill install yazcaleb/skills openrouter-models --pin de43c1binstalled the skill into a clean directory. From that installed copy:get-endpoints.tsroute.openai/gpt-4o-mini.