Repository navigation
Closed
Closed
Feature
Copy link
Labels
area:configurationConfig files, instruction files, settings, and environment variablesarea:modelsModel selection, availability, switching, rate limits, and model-specific behavior
Description
Problem Statement
Copilot CLI supports BYOM providers since v1.0.32+, but the supported providers are limited to Anthropic-specific configurations. There is no configuration path for generic local inference endpoints (e.g., LM Studio, Ollama, llama.cpp) that serve OpenAI-compatible APIs.
This means:
- Local models cannot be registered as BYOM providers for main session tool calls
- Subagent tasks dispatched via
runSubagenthave no local routing path - Extensions like VSCode-LMStudio-Bridge cannot expose local models to the Copilot ecosystem
How Other Agents Handle This
Opencode (anomalyco/opencode)
- Provider config system with explicit provider registration
- Supports llama.cpp, Ollama, and generic OpenAI-compatible endpoints
- Subagents inherit session model; provider configuration flows through all dispatch paths
Claude Code (anthropics/claude-code)
- Defaults to cloud but overridable via
SG_AGENTIC_MODELenv var - Model selection is per-request, not session-bound
- Allows explicit model override for subagent tasks
Codex (openai/codex)
ModelProviderabstraction with routing layer (models_endpoint.rs)- Supports multiple providers including Amazon Bedrock and local endpoints
- Clean separation between tool execution and model inference
What We Need
- Generic BYOM provider registration: Allow configuration of arbitrary OpenAI-compatible endpoints as BYOM providers
- Subagent model inheritance: Ensure subagent tasks respect the session model when it is a local endpoint
- Provider priority/fallback: Support tiered routing (local first, cloud fallback with warning)
Security Implications
- Data leakage: Workspace context transmitted to cloud without user consent when local models are available
- Cost opacity: Untracked cloud API usage from subagent tasks
- Trust erosion: Silent cloud routing violates local-only expectations
- Compliance risk: Sensitive code may be processed by third-party inference services
Related Issues
- Task tool silently downgrades subagent model to session model via multiplier guard (frontmatter and explicit
modeloverride both ignored) #3565 — multiplier guard silently downgrades subagent model - Feature request: local web interface (like
opencode web) #3301 — local model feature request - ian-morgan99/VSCode-LMStudio-Bridge#337 — bridge-level gap analysis
- ian-morgan99/VSCode-LMStudio-Bridge#336 — zero BYOM integration in bridge
Acceptance Criteria
- Generic OpenAI-compatible endpoints can be registered as BYOM providers
- Subagent tasks respect session model when it is a local endpoint
- Provider priority/fallback configuration is supported
- Cost/privacy warnings display when cloud fallback triggers
- Documentation updated with routing behavior and configuration options
Metadata
Metadata
Assignees
Labels
area:configurationConfig files, instruction files, settings, and environment variablesarea:modelsModel selection, availability, switching, rate limits, and model-specific behavior
Activity
stephentoub commentedon Jun 2, 2026
As noted in your duplicate issue at microsoft/copilot-sdk#1545, endpoints compatible with both OpenAI chat completions API and responses API are supported.
https://github.com/github/copilot-sdk/blob/main/docs/auth/byok.md
ian-morgan99 commentedon Jun 3, 2026
Apologies if I'm misunderstanding — I think my point may not have come across clearly in the original issue, so let me try to restate it more precisely.
The response was: "endpoints compatible with both OpenAI chat completions API and responses API are supported."
I believe that's true at the SDK level. What I wasn't clear about is that the ask isn't about endpoint compatibility — it's about the configuration surface to wire a local endpoint into the CLI session.
Here's what I'm observing:
"openai"~/.github/copilot-cli.json(or via CLI flags) to register a local endpoint as a BYOM provider for main session tool callsSo the gap isn't that the SDK can't handle OpenAI-compatible endpoints. It's that there's no user-facing surface to tell the CLI "use this endpoint for my session."
To be concrete: if I run LM Studio on
localhost:1234, what config do I add to make it visible as a BYOM provider in the CLI? If there's a documented path I've missed, I'd be very grateful for a pointer.If no such surface exists yet, I think the original issue is still valid — not as an endpoint compatibility question, but as a missing registration surface for local inference endpoints.
Thanks for the response, and sorry for the confusion in the original framing. Happy to provide more detail if it helps clarify.
stephentoub commentedon Jun 3, 2026
https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models