feat(codemode): make model configurable instead of hardcoded gpt-4.1#28112
feat(codemode): make model configurable instead of hardcoded gpt-4.1#28112agents-git-bot[bot] wants to merge 3 commits intoproductionfrom
Conversation
Synced from cloudflare/agents#849 - Add required `model` parameter to `experimental_codemode` API - Update usage example to show model configuration - Add API reference section with complete parameter documentation - Add migration guide for breaking change from v0.0.6 - Users can now use any AI SDK-compatible model instead of hardcoded gpt-4.1 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
|
Preview URL: https://6e91d441.preview.developers.cloudflare.com |
|
/bonk review this PR. replace |
Co-authored-by: elithrar <elithrar@users.noreply.github.com>
|
Good — all 4 Summary of changes madeReplaced all 4 instances of
|
The model parameter is optional, not required. Updated documentation to:
- Mark model parameter as optional with default value openai("gpt-4.1")
- Remove unused model variable declaration
- Update all code examples to show inline model specification
- Replace "Migration" section with "Model Configuration" showing optional usage
- Add examples for multiple model providers (OpenAI, Anthropic)
- Show that model can be omitted to use default
This aligns the documentation with the actual implementation in
cloudflare/agents PR #849 where model was made optional.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
Closing as this is auto-generated and not the source of truth: https://github.com/cloudflare/skills/ |
Summary
Syncs documentation for cloudflare/agents#849
modelparameter inexperimental_codemodeopenai("gpt-4.1")when not specifiedChanges
Updated Documentation
File:
public/.well-known/skills/agents-sdk/references/codemode.mdAPI Reference Section: Added comprehensive documentation for the
experimental_codemode()function including all parameters and return types, clearly markingmodelas optionalUpdated Usage Example: Modified the code example to include:
modelparameter in thecodemode()call with inline specificationcodemode()andstreamText()Model Configuration Guide: Added a dedicated section showing:
Implementation Details
The
modelparameter is optional inexperimental_codemode(). When not provided, it defaults toopenai("gpt-4.1"). This allows users to:Related Links
Generated by automated docs sync from cloudflare/agents