Commit Graph

43377 Commits

Author SHA1 Message Date
Peter Steinberger
ffe72ffbb9 test: tighten test state payload assertions 2026-05-09 03:36:42 +01:00
Shakker
c414863505 test: tighten tool argument fallback assertions 2026-05-09 03:36:22 +01:00
Peter Steinberger
4f43026db6 test: tighten extension batch metric assertions 2026-05-09 03:35:35 +01:00
Shakker
02635d9e3e test: tighten agent tool schema assertions 2026-05-09 03:34:32 +01:00
Peter Steinberger
0a173bb362 test: tighten android live string assertion 2026-05-09 03:33:02 +01:00
Shakker
ba30f7c0ed test: tighten plugin runtime lookup assertions 2026-05-09 03:32:25 +01:00
Peter Steinberger
ac18768c19 test: tighten browser download path assertion 2026-05-09 03:31:54 +01:00
Peter Steinberger
2083d25e31 test: tighten core primitive assertions 2026-05-09 03:30:40 +01:00
Shakker
3d52a2962e test: tighten channel plugin discovery assertion 2026-05-09 03:29:49 +01:00
Peter Steinberger
d2c1f94234 test: tighten remaining object assertions 2026-05-09 03:28:29 +01:00
Shakker
c547427ca7 test: tighten release metadata guard assertion 2026-05-09 03:26:23 +01:00
Shakker
2f6047a16f test: tighten config schema rejection assertions 2026-05-09 03:26:23 +01:00
Peter Steinberger
e855091a58 test: tighten discord monitor object assertions 2026-05-09 03:23:12 +01:00
Shakker
7b660730e6 test: tighten sdk reconnect assertion 2026-05-09 03:20:35 +01:00
Peter Steinberger
ff2dc79fe7 fix: canonicalize gemini onboarding model keys 2026-05-09 03:19:57 +01:00
Peter Steinberger
2f9a9c6b91 test: tighten config helper object assertions 2026-05-09 03:11:58 +01:00
Peter Steinberger
06625e87df test: tighten doctor storage assertion 2026-05-09 03:10:46 +01:00
Peter Steinberger
c131865944 test: tighten bundled plugin schema assertion 2026-05-09 03:09:33 +01:00
Peter Steinberger
bfe9d5d224 test: tighten clawhub docs schema assertion 2026-05-09 03:07:57 +01:00
Peter Steinberger
b3c06e8d79 revert: remove oc-path implementation 2026-05-09 03:07:12 +01:00
Peter Steinberger
9c8bd022aa revert: remove oc-path workspace substrate 2026-05-09 03:07:12 +01:00
Peter Steinberger
a6dee24c3f test: tighten qa channel context assertion 2026-05-09 03:06:42 +01:00
Peter Steinberger
31ffaf0544 test: tighten respawn plan assertion 2026-05-09 03:05:30 +01:00
Peter Steinberger
25bfe29024 test: tighten core helper object assertions 2026-05-09 03:04:29 +01:00
Peter Steinberger
af5eca9371 test: tighten memory wiki schema assertion 2026-05-09 03:02:03 +01:00
Peter Steinberger
6f575481e7 test: tighten qmd models absence assertion 2026-05-09 02:59:24 +01:00
Shakker
02e60e293f test: tighten memory cleanup assertions 2026-05-09 02:58:05 +01:00
Peter Steinberger
4fe43b9eaf test: tighten memory wiki absence assertion 2026-05-09 02:57:13 +01:00
Shakker
20a2ac3e5d test: tighten extension cleanup assertions 2026-05-09 02:56:17 +01:00
Peter Steinberger
b9bd578d7c test: tighten msteams feedback absence assertion 2026-05-09 02:56:04 +01:00
Peter Steinberger
880c094407 fix: preserve copilot gpt-5.5 fallback metadata 2026-05-08 21:55:18 -04:00
Eduardo Piva
0a911524f2 chore(changelog): collapse github-copilot dynamic-discovery entries
Galin asked for shorter changelog entries — collapse the 2 long
github-copilot bullets (one per code change) into a single one-line
entry that points at the runtime behavior. The PR body retains the
full mapping/fallback/header detail.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 21:55:18 -04:00
Eduardo Piva
ed2a179d3e docs(github-copilot): note live catalog refresh + discovery opt-out
Add an accordion under the Built-in provider tab describing the runtime
catalog refresh from the Copilot `/models` endpoint and the
`plugins.entries.github-copilot.config.discovery.enabled = false` opt-out
for offline / air-gapped scenarios. Pairs with the
`fetchCopilotModelCatalog` change so users know what the new behavior
is and how to disable it if needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
8111ae40c0 test: tighten qqbot symlink assertion 2026-05-09 02:55:01 +01:00
Peter Steinberger
6eddcb8c22 test: tighten cli runner absence assertion 2026-05-09 02:53:53 +01:00
Shakker
b5a66a04aa test: tighten cli runner cleanup assertion 2026-05-09 02:53:43 +01:00
Shakker
50898c4a72 test: tighten backup camera cleanup assertions 2026-05-09 02:51:16 +01:00
Peter Steinberger
e8049fec1c test: tighten backup archive absence assertion 2026-05-09 02:50:35 +01:00
Shakker
ecc7e3c7b5 test: tighten auto reply cleanup assertions 2026-05-09 02:49:41 +01:00
Peter Steinberger
4d8e0bcecc test: tighten session lock cleanup assertion 2026-05-09 02:49:38 +01:00
Peter Steinberger
da0e949d78 test: tighten archive json error assertion 2026-05-09 02:48:38 +01:00
Shakker
59f75e793c test: update cli guidance assertions 2026-05-09 02:47:46 +01:00
Peter Steinberger
05168dd00d test: tighten install source cleanup assertion 2026-05-09 02:47:30 +01:00
Peter Steinberger
55439d81a1 test: tighten update startup absence assertion 2026-05-09 02:46:28 +01:00
Peter Steinberger
0aa7633f5c test: tighten state dir cleanup assertions 2026-05-09 02:45:30 +01:00
Shakker
2f50bb71ef test: tighten session lock absence assertion 2026-05-09 02:44:56 +01:00
Peter Steinberger
65e1cfb773 test: tighten temp home cleanup assertion 2026-05-09 02:44:36 +01:00
Peter Steinberger
065ca2fe25 test: tighten test instance cleanup assertion 2026-05-09 02:43:43 +01:00
Peter Steinberger
c958716d10 test: dedupe browser download absence assertions 2026-05-09 02:42:52 +01:00