ollama - ✅(Solved) Fix launch command for copilot CLI [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#15585Fetched 2026-04-16 06:35:58
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1labeled ×1

Fix Action

Fixed

PR fix notes

PR #15583: cmd/launch: add Copilot CLI integration

Description (problem / solution / changelog)

Summary

This changes Ollama to support launching GitHub Copilot CLI with ollama launch (Issue #15585)

  • add a cmd/launch runner for Copilot CLI, including install detection and Ollama provider environment variables
  • register copilot and copilot-cli in the launch integration registry and help output
  • add integration documentation and README updates for the new supported integration

Usage

Users can run:

ollama launch copilot

and optionally pass a model or additional Copilot CLI arguments through the existing launch flow.

Testing

go test ./cmd/launch

Changed files

  • README.md (modified, +2/-2)
  • cmd/launch/copilot.go (added, +76/-0)
  • cmd/launch/copilot_test.go (added, +161/-0)
  • cmd/launch/launch.go (modified, +1/-0)
  • cmd/launch/registry.go (modified, +13/-0)
  • docs/integrations/copilot-cli.mdx (added, +93/-0)
  • docs/integrations/index.mdx (modified, +1/-0)

Code Example

COPILOT_PROVIDER_BASE_URL          API endpoint URL (required to activate BYOK)
  COPILOT_PROVIDER_TYPE              "openai" (default), "azure", or "anthropic"
  COPILOT_PROVIDER_API_KEY           API key (optional for local providers like Ollama)
  COPILOT_PROVIDER_BEARER_TOKEN      Bearer token (takes precedence over API key)
  COPILOT_PROVIDER_WIRE_API          "completions" (default) or "responses"
  COPILOT_PROVIDER_AZURE_API_VERSION Azure API version (default: versionless v1)

Model Configuration:

  COPILOT_MODEL                             Model name (sets both model ID and wire model)
  COPILOT_PROVIDER_MODEL_ID                 Well-known model ID for agent config and token limits
  COPILOT_PROVIDER_WIRE_MODEL               Model name sent to the provider API for inference
  COPILOT_PROVIDER_MAX_PROMPT_TOKENS        Maximum prompt tokens
  COPILOT_PROVIDER_MAX_OUTPUT_TOKENS        Maximum output tokens

  A model is required for BYOK. Set COPILOT_MODEL, COPILOT_PROVIDER_MODEL_ID, or --model.
RAW_BUFFERClick to expand / collapse

Copilot CLI has support for BYOK now, this enables launching copilot CLI similarly to the existing claude code integration (all environment variables no config files).

I find the copilot help providers output easier to read compared to the web page 😅:

  COPILOT_PROVIDER_BASE_URL          API endpoint URL (required to activate BYOK)
  COPILOT_PROVIDER_TYPE              "openai" (default), "azure", or "anthropic"
  COPILOT_PROVIDER_API_KEY           API key (optional for local providers like Ollama)
  COPILOT_PROVIDER_BEARER_TOKEN      Bearer token (takes precedence over API key)
  COPILOT_PROVIDER_WIRE_API          "completions" (default) or "responses"
  COPILOT_PROVIDER_AZURE_API_VERSION Azure API version (default: versionless v1)

Model Configuration:

  COPILOT_MODEL                             Model name (sets both model ID and wire model)
  COPILOT_PROVIDER_MODEL_ID                 Well-known model ID for agent config and token limits
  COPILOT_PROVIDER_WIRE_MODEL               Model name sent to the provider API for inference
  COPILOT_PROVIDER_MAX_PROMPT_TOKENS        Maximum prompt tokens
  COPILOT_PROVIDER_MAX_OUTPUT_TOKENS        Maximum output tokens

  A model is required for BYOK. Set COPILOT_MODEL, COPILOT_PROVIDER_MODEL_ID, or --model.

extent analysis

TL;DR

To use the Copilot CLI with BYOK, ensure you have set the required environment variables, including COPILOT_PROVIDER_BASE_URL, COPILOT_PROVIDER_TYPE, and a model configuration such as COPILOT_MODEL.

Guidance

  • Verify that you have set the COPILOT_PROVIDER_BASE_URL environment variable to the correct API endpoint URL for your provider.
  • Choose a COPILOT_PROVIDER_TYPE that matches your provider (e.g., "openai", "azure", or "anthropic") and set it as an environment variable.
  • Select a model by setting either COPILOT_MODEL, COPILOT_PROVIDER_MODEL_ID, or using the --model flag, as a model is required for BYOK.
  • Review the other environment variables listed in the copilot help providers output to ensure you have configured all necessary settings for your specific use case.
  • Consult the Copilot documentation for any provider-specific requirements or restrictions.

Notes

The specific requirements may vary depending on the chosen provider and model, so it's essential to consult both the Copilot CLI documentation and your provider's documentation for detailed setup instructions.

Recommendation

Apply the workaround by carefully setting all required environment variables as indicated by the copilot help providers output, ensuring that you have correctly configured your provider and model settings.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING