Repository navigation
fix(quickstart): a free model charges nothing for input and output on every tier - #982
Merged
Merged
Conversation
… every tier QuickStart accepted a model of opencode's own provider when only its input price was zero, and accepted one with no listed price at all. It now uses the root README's filter: opencode's provider, a price list that is not empty, and zero input and output prices on every tier. The retry loop is unchanged. QuickStart has no test project, so the filter is tested from the playground test project, which now references QuickStart.
Merged
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.
What
QuickStart's free-model filter accepted a model of opencode's own provider when only its input price was zero, and it accepted one with no listed price at all. It now applies the root README's streaming-example filter:
the model is on opencode's own provider;
its price list is not empty;
every tier charges nothing for input and output.
FreeModel.cs: the predicate becomesFreeModel.IsFree(ModelInfo), and the catalog search uses it. The retry loop around it is unchanged: the 250 ms rounds, the 30-second budget, and a startup 503 starting another round.QuickStart's README says it selects "a free model from the live catalog" and doesn't state the criterion, so it is unchanged.
Tests
QuickStart has no test project, and a new one for one predicate would be out of proportion. So the playground test project references QuickStart: a ProjectReference, plus
InternalsVisibleToin QuickStart's project, the same pattern HQ uses. The tests are inQuickStart/QuickStartFreeModelTests.cs. They accept a model that charges nothing, and reject:Red, then green:
IsFreecarrying the old predicate, the empty-list and output-price tests failed (2 of 5);Verification
On this head, locally:
0 failed in all, and the tree is clean.