openclaw/extensions/github-copilot
Peter Steinberger 0b8ee4616d
fix(github-copilot): support Gemini image understanding
Fixes Copilot image understanding by exchanging OAuth tokens for Copilot API tokens, routing Copilot Gemini image requests through Chat Completions, and sending the prompt in user content with Copilot vision headers.

Real behavior proof:
- Old Responses route with real Copilot key reproduced `400 model gemini-3.1-pro-preview does not support Responses API`.
- Fixed route with the same real Copilot key returned `Cat`.
- Final CLI live smoke returned `ok: true` and `text: Cat` for `github-copilot/gemini-3.1-pro-preview`.

Verification:
- pnpm test src/media-understanding/image.test.ts extensions/github-copilot/models.test.ts extensions/github-copilot/stream.test.ts src/agents/pi-hooks/compaction-safeguard.test.ts -- --reporter=verbose
- pnpm check:changed via Blacksmith Testbox tbx_01krgt56pqmft8txekt017wke6, Actions run https://github.com/openclaw/openclaw/actions/runs/25803926150, exit 0.

Refs #80393, #80442.

Co-authored-by: Yang Haoyu <150496764+afunnyhy@users.noreply.github.com>
2026-05-13 15:20:27 +01:00
..
api.ts
auth.test.ts test: tighten github copilot auth assertion 2026-05-10 22:58:25 +01:00
auth.ts refactor: reduce plugin sdk surface 2026-05-10 12:37:10 +01:00
connection-bound-ids.live.test.ts build: refresh deps and route testbox through crabbox 2026-05-11 03:41:00 +01:00
connection-bound-ids.test.ts fix(github-copilot): preserve reasoning IDs for Copilot Codex models (#71684) 2026-04-25 20:52:07 +01:00
connection-bound-ids.ts fix(github-copilot): preserve reasoning IDs for Copilot Codex models (#71684) 2026-04-25 20:52:07 +01:00
embeddings.test.ts test: guard copilot embedding mock calls 2026-05-11 22:58:45 +01:00
embeddings.ts fix(github-copilot): support Gemini image understanding 2026-05-13 15:20:27 +01:00
index.test.ts Revert "refactor: move runtime state to SQLite" 2026-05-13 13:33:38 +01:00
index.ts refactor: reduce plugin sdk surface 2026-05-10 12:37:10 +01:00
login.ts fix(github-copilot): support GUI/RPC wizard auth flow (#73290) 2026-04-29 16:45:31 -07:00
model-metadata.ts fix(github-copilot): support Gemini image understanding 2026-05-13 15:20:27 +01:00
models-defaults.ts fix(github-copilot): support Gemini image understanding 2026-05-13 15:20:27 +01:00
models.test.ts fix(github-copilot): support Gemini image understanding 2026-05-13 15:20:27 +01:00
models.ts fix(github-copilot): support Gemini image understanding 2026-05-13 15:20:27 +01:00
openclaw.plugin.json github-copilot: live catalog discovery via /models + add gpt-5.5 2026-05-08 21:55:18 -04:00
package.json build: hard-pin dependency specs 2026-05-12 07:10:13 +01:00
provider-auth.contract.test.ts refactor: promote plugin test helpers to sdk 2026-04-28 00:55:11 +01:00
provider-discovery.contract.test.ts refactor: promote plugin test helpers to sdk 2026-04-28 00:55:11 +01:00
provider-runtime.contract.test.ts refactor: promote plugin test helpers to sdk 2026-04-28 00:55:11 +01:00
register.runtime.ts refactor: reduce plugin sdk surface 2026-05-10 12:37:10 +01:00
replay-policy.ts refactor: reduce plugin sdk surface 2026-05-10 12:37:10 +01:00
stream.test.ts fix(github-copilot): support Gemini image understanding 2026-05-13 15:20:27 +01:00
stream.ts fix(github-copilot): support Gemini image understanding 2026-05-13 15:20:27 +01:00
token.ts refactor: reuse shared dedupe helpers 2026-04-29 12:14:59 +01:00
tsconfig.json
usage.ts fix(github-copilot): support Gemini image understanding 2026-05-13 15:20:27 +01:00