openclaw - 💡(How to fix) Fix [Bug]: GPT models via github-copilot provider fail with 'No API provider registered' in isolated/cron sessions

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…

When using GPT models (gpt-4o-mini, gpt-5-mini, etc.) via the github-copilot provider in isolated or cron sessions, the agent fails with No API provider registered for api: github-copilot whenever a secondary LLM call fires — specifically during context compaction, summarization, or tool-context handling. The same models work correctly in interactive (main/persistent) sessions.

Claude models (claude-sonnet-4.6, claude-opus-4.7) via the same provider are unaffected because they use the built-in anthropic-messages transport which is registered in all session contexts.

A related but distinct failure occurs with claude-haiku-4.5 via the Copilot provider: the primary agent call succeeds but any tool-use payload is rejected by Copilot's proxy with provider rejected the request schema or tool payload. This is consistent across all isolated session types and has been reproducible since at least 2026.4.15 (see #68735).

Error Message

FailoverError: LLM request failed: provider rejected the request schema or tool payload. lane task error: lane=cron-nested durationMs=6536 error="FailoverError: LLM request failed: provider rejected the request schema or tool payload."

Root Cause

Claude models (claude-sonnet-4.6, claude-opus-4.7) via the same provider are unaffected because they use the built-in anthropic-messages transport which is registered in all session contexts.

Fix Action

Fix / Workaround

Root cause (traced through source): In an isolated session, the Copilot plugin's wrapStreamFn hook fires correctly for the primary agent call. However, secondary calls dispatched via simple-completion-transport (compaction, tool-context summarization) call getApiProvider("github-copilot") directly — and "github-copilot" is not a registered transport API in SUPPORTED_TRANSPORT_APIS. The primary session's registerProviderStreamForModel registration does not persist into the isolated session context.

Code Example

{
  "models": {
    "providers": {
      "github-copilot": {
        "baseUrl": "https://api.enterprise.githubcopilot.com",
        "models": [
          {
            "id": "gpt-4o-mini",
            "name": "GPT-4o mini",
            "api": "openai-responses",
            "input": ["text"],
            "contextWindow": 128000,
            "maxTokens": 16384
          }
        ]
      }
    }
  }
}

---

FailoverError: LLM request failed: provider rejected the request schema or tool payload.
lane task error: lane=cron-nested durationMs=6536 error="FailoverError: LLM request failed: provider rejected the request schema or tool payload."

---

FailoverError: LLM request failed: provider rejected the request schema or tool payload.
cron: job run returned error status — jobName: tool-test-gpt-5-mini
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

When using GPT models (gpt-4o-mini, gpt-5-mini, etc.) via the github-copilot provider in isolated or cron sessions, the agent fails with No API provider registered for api: github-copilot whenever a secondary LLM call fires — specifically during context compaction, summarization, or tool-context handling. The same models work correctly in interactive (main/persistent) sessions.

Claude models (claude-sonnet-4.6, claude-opus-4.7) via the same provider are unaffected because they use the built-in anthropic-messages transport which is registered in all session contexts.

A related but distinct failure occurs with claude-haiku-4.5 via the Copilot provider: the primary agent call succeeds but any tool-use payload is rejected by Copilot's proxy with provider rejected the request schema or tool payload. This is consistent across all isolated session types and has been reproducible since at least 2026.4.15 (see #68735).

Steps to reproduce

  1. Configure openclaw.json with a GPT model via the github-copilot provider:
{
  "models": {
    "providers": {
      "github-copilot": {
        "baseUrl": "https://api.enterprise.githubcopilot.com",
        "models": [
          {
            "id": "gpt-4o-mini",
            "name": "GPT-4o mini",
            "api": "openai-responses",
            "input": ["text"],
            "contextWindow": 128000,
            "maxTokens": 16384
          }
        ]
      }
    }
  }
}
  1. Create a cron job targeting github-copilot/gpt-4o-mini with sessionTarget: "isolated" and a payload that includes any tool call (e.g. exec)
  2. Trigger the cron job
  3. Observe failure

Expected behavior

GPT models via the github-copilot provider should work in isolated/cron sessions with the same reliability as interactive sessions. Secondary LLM calls (compaction, summarization) should resolve the provider transport correctly regardless of session type.

Actual behavior

Cron/isolated session fails immediately with:

FailoverError: LLM request failed: provider rejected the request schema or tool payload.
lane task error: lane=cron-nested durationMs=6536 error="FailoverError: LLM request failed: provider rejected the request schema or tool payload."

Root cause (traced through source): In an isolated session, the Copilot plugin's wrapStreamFn hook fires correctly for the primary agent call. However, secondary calls dispatched via simple-completion-transport (compaction, tool-context summarization) call getApiProvider("github-copilot") directly — and "github-copilot" is not a registered transport API in SUPPORTED_TRANSPORT_APIS. The primary session's registerProviderStreamForModel registration does not persist into the isolated session context.

Claude models are unaffected because they use "api": "anthropic-messages" — a built-in transport registered globally. The fix for the Ollama provider applied a similar global registration pattern; the same fix needs to be applied for the github-copilot provider.

Additional failure: Claude Haiku tool-use rejection

claude-haiku-4.5 via github-copilot provider consistently fails tool-use in all session types with provider rejected the request schema or tool payload. The model reaches the LLM but Copilot's proxy rejects the tool schema. claude-sonnet-4.6 and claude-opus-4.7 do not exhibit this behavior. Suspected cause: Copilot's Enterprise proxy applies different tool-schema validation rules per model tier.

OpenClaw version

2026.5.18 (also reproduced on 2026.5.12)

Operating system

macOS 15.7.7 (Sequoia), x64

Install method

npm global

Model

github-copilot/gpt-4o-mini, github-copilot/gpt-5-mini (isolated/cron session failure) github-copilot/claude-haiku-4.5 (tool-use rejection in all session types)

Provider / routing chain

openclaw → github-copilot provider → api: openai-responses → Copilot Enterprise endpoint

Additional provider/model setup details

  • Endpoint: https://api.enterprise.githubcopilot.com
  • Auth: GitHub Copilot Enterprise
  • tools.agentToAgent.enabled: true
  • proxy.enabled: true (tinyproxy on 127.0.0.1:8888) — proxy is not the cause; same failure occurs without proxy

Logs and evidence

Primary error in cron/isolated session:

FailoverError: LLM request failed: provider rejected the request schema or tool payload.
cron: job run returned error status — jobName: tool-test-gpt-5-mini

Related open issue: #68735 (GPT models fail after first message — same root cause, different symptom)

Impact and severity

High — prevents use of GPT models (including cost-efficient gpt-4o-mini at $0.15/1M tokens) in all automated/cron workflows. Forced to use claude-sonnet-4.6 ($3/1M tokens) for all tool-using automation, a 20x cost difference at retail pricing.

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…

FAQ

Expected behavior

GPT models via the github-copilot provider should work in isolated/cron sessions with the same reliability as interactive sessions. Secondary LLM calls (compaction, summarization) should resolve the provider transport correctly regardless of session type.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: GPT models via github-copilot provider fail with 'No API provider registered' in isolated/cron sessions