Skip to content

feat(providers): add Claude models to GitHub Copilot provider - #11447

Closed
yylonly wants to merge 3 commits into
openclaw:mainfrom
yylonly:feat/github-copilot-claude-models
Closed

yylonly wants to merge 3 commits into
openclaw:mainfrom
yylonly:feat/github-copilot-claude-models

Conversation

@yylonly

@yylonly yylonly commented Feb 7, 2026 •

Copy link
Copy Markdown

Add Claude model support (claude-sonnet-4, claude-opus-4.5) to the GitHub Copilot provider, enabling users to access Anthropic models through their Copilot subscription.

Greptile Overview

Greptile Summary

This PR expands the built-in github-copilot provider by adding Claude model IDs to the default Copilot model list and documenting the available Copilot models. It also tweaks failover classification to treat the string fetch failed as a timeout.

The main issues are around model-id correctness/consistency: the PR introduces claude-sonnet-4.5 (dot) but the rest of the repository uses the dash form claude-sonnet-4-5; if Copilot expects the dash form, the new default will fail and the docs will cause users to copy an invalid ID. Additionally, treating generic fetch failed network errors as timeouts can trigger failover for non-timeout failures, altering behavior in cases like DNS/TLS/connection failures.

Confidence Score: 3/5

  • This PR is close to mergeable but likely needs fixes to model IDs and error classification behavior.
  • Core changes are small, but the introduced claude-sonnet-4.5 identifier appears inconsistent with established model-id conventions in this repo and may cause immediate runtime model-selection failures if Copilot expects claude-sonnet-4-5. Separately, classifying the generic undici fetch failed error as a timeout can change failover routing for non-timeout network failures.
  • docs/providers/github-copilot.md, src/providers/github-copilot-models.ts, src/agents/pi-embedded-helpers/errors.ts

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling labels Feb 7, 2026

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

3 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +80 to +84
### Claude models (Pro+ subscription required)

- `claude-opus-4.5`
- `claude-sonnet-4.5`
- `claude-sonnet-4`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wrong Claude model id

This doc lists claude-sonnet-4.5, but the codebase consistently uses the dash form claude-sonnet-4-5 (and the built-in provider default list in this PR also adds the dot form). If Copilot expects the dash form, users will copy/paste an ID that gets rejected. Please align the Copilot Claude model IDs with the canonical IDs used elsewhere in this repo (e.g. claude-sonnet-4-5).

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/providers/github-copilot.md
Line: 80:84

Comment:
**Wrong Claude model id**

This doc lists `claude-sonnet-4.5`, but the codebase consistently uses the dash form `claude-sonnet-4-5` (and the built-in provider default list in this PR also adds the dot form). If Copilot expects the dash form, users will copy/paste an ID that gets rejected. Please align the Copilot Claude model IDs with the canonical IDs used elsewhere in this repo (e.g. `claude-sonnet-4-5`).

How can I resolve this? If you propose a fix, please make it concise.

Comment thread src/providers/github-copilot-models.ts Resolved
Comment on lines +453 to +459
timeout: [
"timeout",
"timed out",
"deadline exceeded",
"context deadline exceeded",
"fetch failed",
],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Misclassifies network failure

Adding the literal string "fetch failed" to the timeout patterns will classify generic undici/Node TypeError("fetch failed") network failures (DNS/TLS/connection refused, etc.) as timeout, which then triggers failover behavior via classifyFailoverReason. This is not necessarily a timeout and will change routing/retry behavior for non-timeout failures; consider classifying it separately or only when the underlying cause indicates an actual timeout.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agents/pi-embedded-helpers/errors.ts
Line: 453:459

Comment:
**Misclassifies network failure**

Adding the literal string `"fetch failed"` to the timeout patterns will classify generic undici/Node `TypeError("fetch failed")` network failures (DNS/TLS/connection refused, etc.) as `timeout`, which then triggers failover behavior via `classifyFailoverReason`. This is not necessarily a timeout and will change routing/retry behavior for non-timeout failures; consider classifying it separately or only when the underlying cause indicates an actual timeout.

How can I resolve this? If you propose a fix, please make it concise.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d72e0e2a0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +453 to +458
timeout: [
"timeout",
"timed out",
"deadline exceeded",
"context deadline exceeded",
"fetch failed",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Avoid treating generic “fetch failed” as timeout

Adding the literal "fetch failed" to the timeout patterns will classify any generic fetch failure as a timeout. In Node/undici, “fetch failed” is the default message for a wide range of network errors (DNS, TLS, connection refused), not only timeouts. This classification feeds into classifyFailoverReason and the embedded runner’s rotation/marking logic (see pi-embedded-runner/run.ts around the timeout handling), so a transient DNS/proxy misconfiguration would incorrectly mark auth profiles as timeout failures and rotate accounts instead of surfacing the connectivity issue. Consider matching more specific timeout signals (error codes) or inspecting the underlying error cause rather than the generic message.

Useful? React with 👍 / 👎.

yylonly added 2 commits February 14, 2026 01:11
- Add claude-opus-4.5, claude-sonnet-4.5, claude-sonnet-4 to default models
- Use larger context window (200k) for Claude models
- Document available models in GitHub Copilot docs
- Classify 'fetch failed' as timeout error for failover handling
@yylonly
yylonly force-pushed the feat/github-copilot-claude-models branch from 32c9983 to f0fba02 Compare February 13, 2026 19:27
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added stale Marked as stale due to inactivity and removed stale Marked as stale due to inactivity labels Feb 21, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Mar 8, 2026
@openclaw-barnacle

Copy link
Copy Markdown

Closing due to inactivity.
If you believe this PR should be revived, post in #pr-thunderdome-dangerzone on Discord to talk to a maintainer.
That channel is the escape hatch for high-quality PRs that get auto-closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: macos App: macos docs Improvements or additions to documentation size: XS stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant