Skip to content

Export ProviderConfig from Node.js and Python SDKs#1048

Open
stephentoub wants to merge 1 commit intomainfrom
stephentoub/export-provider-config
Open

Export ProviderConfig from Node.js and Python SDKs#1048
stephentoub wants to merge 1 commit intomainfrom
stephentoub/export-provider-config

Conversation

@stephentoub
Copy link
Copy Markdown
Collaborator

@stephentoub stephentoub commented Apr 8, 2026

ProviderConfig is 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 ProviderConfig to the public exports of both SDKs:

  • Node.js — added to the export type { ... } block in src/index.ts
  • Python — imported from session and added to __all__ in copilot/__init__.py

Go and .NET were already fine — Go exports via capitalized naming and .NET via public class.

Fixes #968

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>
@stephentoub stephentoub requested a review from a team as a code owner April 8, 2026 19:24
Copilot AI review requested due to automatic review settings April 8, 2026 19:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 ProviderConfig from the top-level src/index.ts type exports.
  • Python: re-exported ProviderConfig by importing it from session and 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Cross-SDK Consistency Review ✅

This PR correctly addresses a cross-SDK export gap and maintains consistency across all four SDK implementations.

SDK Status How ProviderConfig is exported
Go ✅ Already exported Capitalized struct name (ProviderConfig) in go/types.go
.NET ✅ Already exported public class ProviderConfig in dotnet/src/Types.cs
Node.js ✅ Fixed in this PR Added to export type { ... } block in src/index.ts
Python ✅ Fixed in this PR Imported and added to __all__ in copilot/__init__.py

No further changes needed — this PR brings all SDKs to parity.

Generated by SDK Consistency Review Agent for issue #1048 ·

@SteveSandersonMS
Copy link
Copy Markdown
Contributor

SteveSandersonMS commented Apr 9, 2026

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 SessionConfig["provider"]), so it's not really necessary to duplicate it. Jakub thought that was sufficient, but it's certainly not as obvious, so exporting it with a name makes sense.

Copy link
Copy Markdown
Contributor

@SteveSandersonMS SteveSandersonMS left a comment

Choose a reason for hiding this comment

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

Thanks!

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 ProviderConfig to better support Responses API

3 participants