Commit Graph

161 Commits

Author SHA1 Message Date
Peter Steinberger
b430270429 test: dedupe copilot model fetch mock reads 2026-05-13 07:07:56 +01:00
Peter Steinberger
ea05be12b4 test: guard extension provider mock calls 2026-05-12 11:11:04 +01:00
Peter Steinberger
f6d787cc5c build: hard-pin dependency specs 2026-05-12 07:10:13 +01:00
Peter Steinberger
c98698aa0e chore: release 2026.5.12-beta.1 2026-05-12 06:33:41 +01:00
Peter Steinberger
5c14f159c6 test: guard github copilot mock calls 2026-05-12 00:16:04 +01:00
Peter Steinberger
c8e5030d29 test: guard copilot embedding mock calls 2026-05-11 22:58:45 +01:00
Peter Steinberger
b8c3a0b14b test: avoid copilot model module resets 2026-05-11 21:37:05 +01:00
Peter Steinberger
58087ef3d6 test: tighten extension auth assertions 2026-05-11 14:02:35 +01:00
Shakker
d544414eef test: tighten copilot model assertions 2026-05-11 09:13:17 +01:00
Shakker
44b13ef25e test: tighten copilot stream assertions 2026-05-11 09:12:02 +01:00
Peter Steinberger
15cf49222f build: refresh deps and route testbox through crabbox 2026-05-11 03:41:00 +01:00
Peter Steinberger
6346e792c4 build: enable stricter TypeScript checks 2026-05-11 02:04:17 +01:00
Shakker
961bf5d4ad test: tighten github copilot stream assertion 2026-05-10 23:00:17 +01:00
Shakker
57e2aa2cb9 test: tighten github copilot auth assertion 2026-05-10 22:58:25 +01:00
Peter Steinberger
827b0de0ce refactor: reduce plugin sdk surface 2026-05-10 12:37:10 +01:00
Peter Steinberger
9243b575ed chore(release): prepare 2026.5.10-beta.1 2026-05-10 06:13:38 +01:00
Andy Ye
c20450a82b fix(github-copilot): mint tokens with vscode chat identity 2026-05-10 01:05:59 -04:00
Peter Steinberger
beaecbcad4 refactor: use PI Codex Responses transport (#79726)
Routes explicit OpenAI Codex Responses runs through PI's native WebSocket-capable transport and removes the custom OpenClaw WebSocket implementation.
2026-05-09 05:40:30 -04:00
Peter Steinberger
9385eaaf88 chore(release): prepare 2026.5.8 2026-05-09 08:05:17 +01:00
Peter Steinberger
311e4608d1 feat: unify model catalog registration 2026-05-09 02:34:56 -04:00
Shakker
67e1f1a6b2 test: tighten plugin config empty assertions 2026-05-09 04:30:16 +01:00
Peter Steinberger
880c094407 fix: preserve copilot gpt-5.5 fallback metadata 2026-05-08 21:55:18 -04:00
Eduardo Piva
75405f64d0 github-copilot: live catalog discovery via /models + add gpt-5.5
The plugin's `catalog.run` hook already exchanged a GitHub OAuth token
for a short-lived Copilot API token and resolved the per-account baseUrl,
but it returned `models: []` and the bundled openclaw runtime relied
entirely on the static manifest catalog. That meant:

- Static `contextWindow` values were a conservative 128k for every
  model, far below reality (gpt-5.4/5.5 are 400k, claude-opus-4.6/4.7
  internal variants are 1M, claude-sonnet-4 is 200k, etc.).
- Newly published Copilot models (gpt-5.5, gpt-5.1*, gemini-3-pro-preview,
  the claude-opus-*-1m internal variants, etc.) didn't appear at all
  until the manifest was patched.
- Per-account entitlement was invisible — every user saw the same
  hardcoded 22-model list regardless of plan.

Wire it up:

- Add `fetchCopilotModelCatalog` in `extensions/github-copilot/models.ts`.
  Calls `${baseUrl}/models` with the resolved Copilot API token and the
  same Editor-Version / Copilot-Integration-Id headers used elsewhere in
  the plugin. Maps each entry to a `ModelDefinitionConfig`:
  - `contextWindow` ← `capabilities.limits.max_context_window_tokens`
  - `maxTokens`     ← `capabilities.limits.max_output_tokens`
  - `input`         ← `["text", "image"]` if `supports.vision`, else `["text"]`
  - `reasoning`     ← `Array.isArray(supports.reasoning_effort) && supports.reasoning_effort.length > 0`
  - `api`           ← `anthropic-messages` for Anthropic vendor or claude*
                      ids; otherwise `openai-responses`
  Filters out non-chat objects (embeddings) and internal routers
  (`accounts/...` ids). Dedupes by id. 10s default timeout.

- Update the `catalog.run` hook in `extensions/github-copilot/index.ts`
  to call the new function after token-exchange and return the live
  results. On any HTTP/parse failure it falls back to `models: []`,
  which preserves the static manifest catalog as the visible fallback —
  no behavior regression for users with `discovery.enabled: false` or
  in offline scenarios.

- Bump `modelCatalog.discovery."github-copilot"` from `"static"` to
  `"refreshable"` in `openclaw.plugin.json` so the catalog hook is
  actually invoked at runtime. Without this the discovery infrastructure
  treats the provider as static-only and never calls `catalog.run`.

- Add `gpt-5.5` to the static manifest catalog and `DEFAULT_MODEL_IDS`
  with the correct values from the API (`contextWindow: 400000`,
  `maxTokens: 128000`, `reasoning: true`, multimodal). This means users
  on `discovery.enabled: false` still get gpt-5.5 visible without
  needing to override `models.providers.github-copilot.models` in their
  config.

Tests added (5, all passing alongside the existing 24):

- `fetchCopilotModelCatalog` maps a representative `/models` response
  (chat models incl. an internal 1M-context Anthropic variant, a router,
  an embedding) to the right `ModelDefinitionConfig` shape with real
  context windows.
- baseUrl trailing slash is normalized.
- Duplicate ids in the API response are deduped (first wins).
- Non-2xx HTTP raises so the caller can fall back to the static catalog.
- Empty token / baseUrl reject synchronously without calling fetch.

Targeted run: `pnpm test extensions/github-copilot/models.test.ts` →
29/29 pass. `pnpm exec oxfmt --check extensions/github-copilot/` clean.
`pnpm tsgo:core` clean.

Real-world proof:

Built locally and dropped the resulting tarball into a downstream
container with `gh auth login --hostname github.com` (Copilot
subscription on the linked account). Before this change,
`openclaw models list --provider github-copilot` returned the 22-entry
static catalog with every entry showing 128k context. After this change,
the same command (with `--refresh`) returns 30 entries with API-accurate
context windows including the new gpt-5.1 family, the claude-opus-*-1m
variants, and the corrected `gemini-3*-preview` ids.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 21:55:18 -04:00
Peter Steinberger
7e733bedab test: simplify copilot live text extraction 2026-05-09 01:09:27 +01:00
Peter Steinberger
2fc4b4c38f test: require provider optional hooks 2026-05-08 18:04:38 +01:00
Peter Steinberger
9ef37d1907 test: tighten assertions and harness coverage 2026-05-08 05:28:12 +01:00
Peter Steinberger
1ef85c7d4c test: make suites safe without isolation (#78834)
* test: make suites safe without isolation

* fix: narrow auth profile credential types

* test: inject channel module loader factory locally
2026-05-07 08:43:29 +01:00
Peter Steinberger
0b88d6286c chore: bump version to 2026.5.6 2026-05-06 09:47:34 +01:00
Peter Steinberger
8ee08b2b77 chore: update dependencies 2026-05-04 23:07:09 +01:00
Peter Steinberger
5397667272 chore(release): prepare 2026.5.4 2026-05-04 10:09:55 +01:00
Peter Steinberger
31161abd40 chore(release): bump version to 2026.5.3 2026-05-03 03:08:47 +01:00
Peter Steinberger
80da0a0213 chore: bump version to 2026.5.2 2026-05-02 11:58:45 +01:00
Peter Steinberger
040f533f60 chore: update dependencies 2026-05-01 12:43:17 +01:00
Mike Harsh
36bb723dfb fix(github-copilot): support GUI/RPC wizard auth flow (#73290)
Merged via squash.

Prepared head SHA: aea7d6650c
Co-authored-by: indierawk2k2 <18598712+indierawk2k2@users.noreply.github.com>
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Reviewed-by: @shanselman
2026-04-29 16:45:31 -07:00
Peter Steinberger
83267e99b0 chore: update dependencies 2026-04-29 22:42:45 +01:00
Peter Steinberger
d8b9ace39c fix(ci): repair github copilot setup types 2026-04-29 12:31:17 +01:00
Ayaan Zaidi
42b352c57e fix(github-copilot): publish model catalog 2026-04-29 16:48:18 +05:30
Ayaan Zaidi
22c42b6b30 fix(github-copilot): reuse existing auth profiles 2026-04-29 16:48:18 +05:30
Peter Steinberger
34ec184dcb refactor: reuse shared dedupe helpers 2026-04-29 12:14:59 +01:00
Peter Steinberger
996818e6af fix: follow up main ci failures 2026-04-28 05:41:49 +01:00
Peter Steinberger
af7f651db3 refactor(plugin-sdk): retire reserved helper exports 2026-04-28 05:21:57 +01:00
Shakker
00d2c34889 perf: mark provider plugins startup lazy 2026-04-28 04:33:47 +01:00
Peter Steinberger
632b0fd580 chore: update workspace dependencies 2026-04-28 03:09:44 +01:00
Peter Steinberger
f34b41f198 refactor: split plugin sdk test helpers 2026-04-28 01:14:19 +01:00
Peter Steinberger
8057561cee refactor: promote plugin test helpers to sdk 2026-04-28 00:55:11 +01:00
Peter Steinberger
90b6665ded refactor: move plugin api test helper to sdk 2026-04-28 00:24:54 +01:00
Peter Steinberger
0df6e5a473 refactor: expose plugin test helpers via sdk 2026-04-27 23:45:26 +01:00
Peter Steinberger
74e62c32c3 test: route extension tests through sdk subpaths 2026-04-27 21:58:48 +01:00
Peter Steinberger
9090457da7 test(plugin-sdk): use narrow config runtime mocks 2026-04-27 15:14:02 +01:00
Peter Steinberger
4336a7f3a9 refactor(plugin-sdk): narrow config runtime imports 2026-04-27 14:58:32 +01:00