chore(examples): bump module_client.py to gpt-5.6 - #3211
Conversation
b1a7dd9 to
f819b49
Compare
f819b49 to
e58f9ae
Compare
|
Makes sense to keep the module-client example on the current default model. If this is intended as a broadly reusable sample, it may be worth adding a tiny note that users should swap in their own model tier when they need different latency/cost tradeoffs. |
317260c to
e67afa8
Compare
jbeckwith-oai
left a comment
There was a problem hiding this comment.
This update is already stale relative to its stated goal of moving the example to the current default model. The current official Models guide recommends the gpt-5.6 alias (routing to GPT-5.6 Sol), which supports Chat Completions and streaming: https://developers.openai.com/api/docs/models. Please update examples/module_client.py to model="gpt-5.6" instead of landing the previous-generation gpt-5.5 in a current-model refresh. The one-line change otherwise passes Ruff, formatting, compile, and diff checks.
The module-level client example still pinned bare gpt-4. gpt-5.6 is the current recommended alias per the Models guide and supports Chat Completions and streaming, which is what this example uses. model: is typed Union[str, ChatModel], so the bare alias type-checks even though only the gpt-5.6-sol/-terra/-luna snapshots are in the literal today. Only the model string changes.
e58f9ae to
787b457
Compare
|
bumped to |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 787b457685
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| # all API calls work in the exact same fashion as well | ||
| stream = openai.chat.completions.create( | ||
| model="gpt-4", | ||
| model="gpt-5.6", |
There was a problem hiding this comment.
Use the intended gpt-5.5 model
If users copy or run this module-level Chat Completions example, it now sends the bare model id gpt-5.6; however the generated ChatModel literals in this tree include gpt-5.5 and the gpt-5.6-sol/-terra/-luna variants, but not bare gpt-5.6, while the commit message says the example should be bumped to gpt-5.5. Because model also accepts plain str, type checking will not catch this typo before the API rejects or misroutes the example request.
Useful? React with 👍 / 👎.
updated to
gpt-5.6per your review.correcting my original note: i said stainless hadn't synced
gpt-5.5intoChatModel— it had. it is accurate forgpt-5.6though, only the-sol/-terra/-lunasnapshots are in the literal. still type-checks sincemodel:isUnion[str, ChatModel].one flag:
README.mdusesgpt-5.5throughout, so this leaves the example a step ahead of the readme. happy to bump those here or separately.only the model string changes. ruff check + format clean.