docs: refresh the example model from gpt-4o-mini - #10
Merged
Conversation
The README code block renders on the npm package page, so it is the first thing a prospective user reads. npm always includes README.md regardless of the package.json files field, which is why this matters beyond the repo. gpt-4o-mini is two generations behind the model ids the pinned @ai-sdk/openai (4.0.27) accepts. Moves the three call sites to gpt-5.4-mini, the newest id that still has a mini variant, so the examples stay cheap to copy-paste. gpt-5.5 and gpt-5.6 exist but ship no mini tier. Updates all three occurrences rather than the README alone, so the examples cannot contradict the documented snippet. Verified by pnpm typecheck: tsconfig.check.json includes examples/, and openai() takes a typed model-id union, so a wrong string fails the compile. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
jed326
approved these changes
Aug 4, 2026
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.
Why
The README's quick-start block renders on the npm package page, so it is the first code a prospective user reads. npm always includes
README.mdregardless of thefilesfield inpackage.json, so this is not repo-only cosmetics.gpt-4o-miniis two generations behind the model ids the pinned@ai-sdk/openai(4.0.27) accepts.What changed
gpt-4o-mini→gpt-5.4-miniat all three call sites:README.mdexamples/search.tsexamples/answer.tsWhy
gpt-5.4-miniand not the newest id overall. It is the newest model that still has aminivariant, so the examples stay cheap for anyone copy-pasting them — the same intentgpt-4o-minihad.gpt-5.5andgpt-5.6are present in the provider's union but ship no mini tier.Why all three and not just the README. Leaving the examples on the old id would put the documented snippet and the runnable examples in disagreement, which is the failure mode that produced most of the review load on #9.
Verification
pnpm typecheckpasses, and that is load-bearing rather than incidental:tsconfig.check.jsonincludesexamples/, andopenai()takes a typed model-id union, so an id that does not exist in the pinned provider fails the compile. The id was taken from that union, not from memory.pnpm typecheckcleanpnpm testunaffected — no test references a model idOPENAI_API_KEYplusTAKO_API_KEYRelease impact
docs:carries no version bump. If this lands before #8, release-please folds it into 3.0.0 so the 3.0.0 package page does not ship the stale id. If it lands after, it waits for the next release.Lines changed
3 changed (3 docs/examples, 0 logic, 0 tests).
🤖 Generated with Claude Code