Skip to content

Remove protocol= argument from stream() and generate()#141

Merged
elprans merged 1 commit into
mainfrom
elprans/remove-protocol-param
May 22, 2026
Merged

Remove protocol= argument from stream() and generate()#141
elprans merged 1 commit into
mainfrom
elprans/remove-protocol-param

Conversation

@elprans
Copy link
Copy Markdown
Collaborator

@elprans elprans commented May 19, 2026

The protocol= argument was added as part of #101. The concrete
protocol is really a provider property or a model/provider pair property
and would be best to be kept on Model instances exclusively. To
override the protocol using a pre-defined model instance, use the new
with_protocol modifier returning a copy.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-python Ready Ready Preview, Comment May 22, 2026 4:12pm

Copy link
Copy Markdown
Collaborator

@anbuzin anbuzin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't be an Elvis-pilled framework without a single .with_foo method

The `protocol=` argument was added as part of #101.  The concrete
protocol is really a provider property or a model/provider pair property
and would be best to be kept on `Model` instances exclusively.  To
override the protocol using a pre-defined model instance, use the new
`with_protocol` modifier returning a copy.
@elprans elprans force-pushed the elprans/remove-protocol-param branch from 132184b to 5e9eba0 Compare May 22, 2026 16:11
@elprans elprans merged commit 19b9f83 into main May 22, 2026
7 checks passed
@elprans elprans deleted the elprans/remove-protocol-param branch May 22, 2026 16:23
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