Export ProviderConfig from Node.js and Python SDKs#1048
Export ProviderConfig from Node.js and Python SDKs#1048stephentoub wants to merge 1 commit intomainfrom
Conversation
ProviderConfig was defined in both SDKs but not re-exported from their public API entry points. Consumers had to duplicate the type locally to use it for Responses API configuration (wireApi: 'responses'). - Node.js: add ProviderConfig to the type re-exports in src/index.ts - Python: import ProviderConfig in copilot/__init__.py and add to __all__ Fixes github/copilot-sdk-partners#7 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR exposes ProviderConfig as part of the public API surface for the Node.js and Python SDKs, so consumers can reference the SDK’s canonical BYOK/Responses provider type instead of duplicating it locally.
Changes:
- Node.js: re-exported
ProviderConfigfrom the top-levelsrc/index.tstype exports. - Python: re-exported
ProviderConfigby importing it fromsessionand adding it to__all__.
Show a summary per file
| File | Description |
|---|---|
| python/copilot/init.py | Adds ProviderConfig to the package import surface and __all__ for public export. |
| nodejs/src/index.ts | Adds ProviderConfig to the top-level export type { ... } block for public type re-export. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
Cross-SDK Consistency Review ✅This PR correctly addresses a cross-SDK export gap and maintains consistency across all four SDK implementations.
No further changes needed — this PR brings all SDKs to parity.
|
|
Seems worth doing to simplify things for consumers. I mentioned to Jakub earlier this week that it's also possible to reference the type without it being exported (it's |
ProviderConfigis the only way to configure the Responses API (wireApi: 'responses') and BYOK providers, but it wasn't re-exported from the public API of the Node.js or Python SDKs. Consumers had to duplicate the type locally to reference it in their own code.This adds
ProviderConfigto the public exports of both SDKs:export type { ... }block insrc/index.tssessionand added to__all__incopilot/__init__.pyGo and .NET were already fine — Go exports via capitalized naming and .NET via
public class.Fixes #968