Skip to content

Add provider info to docs#257

Merged
friggeri merged 1 commit intomainfrom
provider-info
Jan 29, 2026
Merged

Add provider info to docs#257
friggeri merged 1 commit intomainfrom
provider-info

Conversation

@patniko
Copy link
Contributor

@patniko patniko commented Jan 29, 2026

No description provided.

@patniko patniko requested a review from a team as a code owner January 29, 2026 16:31
Copilot AI review requested due to automatic review settings January 29, 2026 16:31
@github-actions
Copy link

Cross-SDK Documentation Consistency Review

This PR adds excellent comprehensive documentation for custom providers (BYOK) to Node.js and Go SDKs, including:

  • Detailed ProviderConfig field descriptions
  • Three practical examples (Ollama, custom OpenAI-compatible, Azure OpenAI)
  • Important notes about the model parameter requirement

📋 Inconsistencies Found

The Python and .NET SDKs are missing this same level of documentation:

Python SDK (python/README.md):

  • No custom provider documentation exists at all
  • The create_session() examples don't mention the provider parameter
  • Should add a "Custom Providers" section similar to Node.js/Go

.NET SDK (dotnet/README.md):

  • ⚠️ Has a minimal "Bring Your Own Key (BYOK)" section (lines 431-445)
  • Only shows one basic example without field descriptions
  • Missing the comprehensive ProviderConfig field documentation
  • Missing Ollama and Azure OpenAI examples
  • Should be expanded to match the Node.js/Go format

💡 Recommendation

To maintain cross-SDK consistency, consider adding similar "Custom Providers" documentation sections to:

  1. Python README - Add a new comprehensive section
  2. .NET README - Expand the existing BYOK section with field descriptions and additional examples

The feature appears to be implemented in the code already (since .NET has a basic BYOK example), so this is purely a documentation gap.


Note: This is a suggestion to improve documentation consistency. The changes in this PR are well-written and should be merged regardless—the Python/.NET docs can be updated in a follow-up PR.

AI generated by SDK Consistency Review Agent

@friggeri friggeri added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit e26c442 Jan 29, 2026
33 checks passed
@friggeri friggeri deleted the provider-info branch January 29, 2026 16:37
Copy link
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

Updates the Node.js and Go SDK READMEs to document BYOK/custom provider support and how to configure provider settings.

Changes:

  • Document provider configuration on session creation (and resume for Go), including notes about model selection.
  • Add “Custom Providers” sections describing ProviderConfig fields and defaults.
  • Provide example configurations for Ollama, generic OpenAI-compatible endpoints, and Azure OpenAI.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
nodejs/README.md Adds provider to session config docs and introduces a Custom Providers section with ProviderConfig fields + TS examples.
go/README.md Expands API reference to include SessionConfig/ResumeSessionConfig provider details and adds a Custom Providers section with Go examples.
Comments suppressed due to low confidence (1)

go/README.md:114

  • Similarly, ResumeSessionConfig in the Go SDK includes more than Tools/Provider/Streaming (e.g., OnPermissionRequest, MCPServers, CustomAgents, SkillDirectories, DisabledSkills). Please either document the remaining options or note that only the most common fields are listed here.
**ResumeSessionConfig:**

- `Tools` ([]Tool): Tools to expose when resuming
- `Provider` (\*ProviderConfig): Custom API provider configuration (BYOK). See [Custom Providers](#custom-providers) section.
- `Streaming` (bool): Enable streaming delta events

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- `apiKey?: string` - API key (optional for local providers like Ollama)
- `bearerToken?: string` - Bearer token for authentication (takes precedence over apiKey)
- `wireApi?: "completions" | "responses"` - API format for OpenAI/Azure (default: "completions")
- `azure?.apiVersion?: string` - Azure API version (default: "2024-10-21")
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

In the ProviderConfig field list, azure?.apiVersion looks like TypeScript optional-chaining syntax rather than the actual config shape. Consider documenting this as azure.apiVersion?: string (or azure?: { apiVersion?: string }) to match the ProviderConfig type and avoid confusion.

Suggested change
- `azure?.apiVersion?: string` - Azure API version (default: "2024-10-21")
- `azure?: { apiVersion?: string }` - Azure-specific configuration (default apiVersion: "2024-10-21")

Copilot uses AI. Check for mistakes.
Comment on lines +100 to +104
**SessionConfig:**

- `Model` (string): Model to use ("gpt-5", "claude-sonnet-4.5", etc.). **Required when using custom provider.**
- `SessionID` (string): Custom session ID
- `Tools` ([]Tool): Custom tools exposed to the CLI
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

The new SessionConfig section reads like an exhaustive field list, but it omits several fields that exist on copilot.SessionConfig (e.g., ConfigDir, AvailableTools, ExcludedTools, OnPermissionRequest, MCPServers, CustomAgents, SkillDirectories, DisabledSkills). Either include the missing fields or clarify that this list is partial.

Copilot uses AI. Check for mistakes.
Comment on lines +357 to +361
session, err := client.CreateSession(&copilot.SessionConfig{
Model: "deepseek-coder-v2:16b", // Required when using custom provider
Provider: &copilot.ProviderConfig{
Type: "openai",
BaseURL: "http://localhost:11434/v1", // Ollama endpoint
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

These Go snippets declare session, err := ... but don’t use either value or handle the error, which makes the example not compile as-is. Consider adding minimal error handling and using session (or assign to _), and include any needed imports for os.Getenv in the subsequent examples.

Copilot uses AI. Check for mistakes.
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