mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 16:44:45 +00:00
fix(github-copilot): request identity-encoded API responses
This commit is contained in:
@@ -6,6 +6,7 @@ Docs: https://docs.openclaw.ai
|
||||
|
||||
### Fixes
|
||||
|
||||
- Providers/GitHub Copilot: request identity-encoded Copilot API responses across token exchange, catalog, model calls, usage, and embeddings so compressed Business-account error payloads no longer reach JSON parsers as gzip bytes. Fixes #82871. Thanks @tonyfe01.
|
||||
- Agents/diagnostics: split slow embedded-run `attempt-dispatch` startup summaries into workspace, prompt, runtime-plan, and final dispatch subspans so traces identify the delayed setup phase. Fixes #82782. (#82783) Thanks @galiniliev.
|
||||
- CLI/media: accept HTTP(S) URLs in `openclaw infer image describe --file`, fetching remote images through the guarded media path instead of treating URLs as local files. Fixes #82837. (#82854) Thanks @neeravmakwana.
|
||||
- Agents/subagents: keep session-backed parent runs active when the child wait call times out before the child session has actually settled, so late subagent completions are reconciled instead of being lost. Fixes #82787. Thanks @ramitrkar-hash.
|
||||
|
||||
@@ -244,6 +244,7 @@ describe("githubCopilotMemoryEmbeddingProviderAdapter", () => {
|
||||
|
||||
const discoveryCall = firstDiscoveryRequest();
|
||||
expect(discoveryCall.url).toBe("https://proxy.example/v1/models");
|
||||
expect(discoveryCall.init.headers["Accept-Encoding"]).toBe("identity");
|
||||
expect(discoveryCall.init.headers["X-Proxy-Token"]).toBe("proxy");
|
||||
});
|
||||
|
||||
|
||||
@@ -412,6 +412,10 @@ describe("github-copilot token", () => {
|
||||
|
||||
expect(res.token).toBe("fresh;proxy-ep=https://proxy.contoso.test;");
|
||||
expect(res.baseUrl).toBe("https://api.contoso.test");
|
||||
const [, calledInit] = fetchImpl.mock.calls[0] ?? [];
|
||||
expect(((calledInit as RequestInit).headers as Record<string, string>)["Accept-Encoding"]).toBe(
|
||||
"identity",
|
||||
);
|
||||
expect(jsonStoreMocks.saveJsonFile).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
@@ -537,6 +541,9 @@ describe("fetchCopilotModelCatalog", () => {
|
||||
expect(((calledInit as RequestInit).headers as Record<string, string>).Authorization).toBe(
|
||||
"Bearer tid=test",
|
||||
);
|
||||
expect(((calledInit as RequestInit).headers as Record<string, string>)["Accept-Encoding"]).toBe(
|
||||
"identity",
|
||||
);
|
||||
|
||||
expect(out.map((m) => m.id)).toEqual([
|
||||
"gpt-5.5",
|
||||
|
||||
@@ -64,6 +64,7 @@ describe("wrapCopilotAnthropicStream", () => {
|
||||
messages,
|
||||
hasImages: true,
|
||||
});
|
||||
expect(expectedCopilotHeaders["Accept-Encoding"]).toBe("identity");
|
||||
|
||||
void wrapped(
|
||||
{
|
||||
|
||||
@@ -122,6 +122,7 @@ export function buildCopilotIdeHeaders(
|
||||
} = {},
|
||||
): Record<string, string> {
|
||||
return {
|
||||
"Accept-Encoding": "identity",
|
||||
"Editor-Version": COPILOT_EDITOR_VERSION,
|
||||
"Editor-Plugin-Version": COPILOT_EDITOR_PLUGIN_VERSION,
|
||||
"User-Agent": COPILOT_USER_AGENT,
|
||||
|
||||
Reference in New Issue
Block a user