Skip to content

docs: refresh the example model from gpt-4o-mini - #10

Merged
robertabbott merged 1 commit into
mainfrom
docs/refresh-example-model
Aug 4, 2026
Merged

docs: refresh the example model from gpt-4o-mini#10
robertabbott merged 1 commit into
mainfrom
docs/refresh-example-model

Conversation

@robertabbott

Copy link
Copy Markdown
Collaborator

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.md regardless of the files field in package.json, so this is not repo-only cosmetics.

gpt-4o-mini is two generations behind the model ids the pinned @ai-sdk/openai (4.0.27) accepts.

What changed

gpt-4o-minigpt-5.4-mini at all three call sites:

File Line
README.md 35 (quick start)
examples/search.ts 8
examples/answer.ts 8

Why gpt-5.4-mini and not the newest id overall. It is the newest model that still has a mini variant, so the examples stay cheap for anyone copy-pasting them — the same intent gpt-4o-mini had. gpt-5.5 and gpt-5.6 are 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 typecheck passes, and that is load-bearing rather than incidental: tsconfig.check.json includes examples/, and openai() 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 typecheck clean
  • pnpm test unaffected — no test references a model id
  • Examples not executed; they make live billed calls and need OPENAI_API_KEY plus TAKO_API_KEY

Release 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

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>
@robertabbott
robertabbott merged commit bb2bffd into main Aug 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants