Skip to content

Export ProviderOpenAICompatible and generics#1047

Draft
thisisnic wants to merge 5 commits into
tidyverse:mainfrom
thisisnic:595-exports-classes
Draft

Export ProviderOpenAICompatible and generics#1047
thisisnic wants to merge 5 commits into
tidyverse:mainfrom
thisisnic:595-exports-classes

Conversation

@thisisnic

@thisisnic thisisnic commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Closes #595

This PR exports Chat, ToolDef, ProviderOpenAICompatible, and the provider generics so that downstream packages can create custom providers by subclassing ProviderOpenAICompatible.

I'm unsure on if this approach is desired though as chat_openai_compatible() (implemented after the original issue was opened) already covers the common case (custom endpoint + auth + extra args). This PR goes further by exporting the class and generics so downstream packages can subclass ProviderOpenAICompatible and override specific behavior (e.g. response parsing, parameter mapping). Is that level of extensibility something we want to support?

@thisisnic thisisnic requested a review from hadley July 6, 2026 10:59
@thisisnic thisisnic marked this pull request as ready for review July 6, 2026 10:59
@thisisnic

Copy link
Copy Markdown
Collaborator Author

CI failures due to rlang 1.3.0 release and fixed by #1048

@thisisnic

Copy link
Copy Markdown
Collaborator Author

Marking as draft as exporting all these generics might not be the right design decision - will wait to see if chat_openai_compatible() goes far enough to solve the original problem

@thisisnic thisisnic marked this pull request as draft July 6, 2026 17:43
@thisisnic thisisnic force-pushed the 595-exports-classes branch from ec19c3f to 99620ec Compare July 11, 2026 09:35
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.

Export Chat and ProviderOpenAI

1 participant