Repository navigation
docs: cover unreleased model catalogs, cache usage, and client disconnects - #560
Merged
Merged
Conversation
commit: |
jpr5
marked this pull request as ready for review
October 20, 2026 21:27
…nects - README features: required-header policy, native model catalogs and token counts - fixtures usage override: Anthropic cache fields, linked to Claude Messages Cache Usage - Claude Messages and Error Injection: a client disconnect journals "client aborted" - write-fixtures skill: embeddingRequest match field, count, catalog and embed routes, /v1/models catalog selection, Anthropic cache usage
- Streaming Physics: a new Non-Streaming Responses section (OpenAI Chat Completions only, summed per-chunk delays) and a latency note that bare latency and --latency never delay stream:false replies - write-fixtures skill: gotchas 3 and 4 carry the same rule
Counts are ceil(message chars / 4), plus ceil(tool JSON / 4) when tools are present, each at least 1 (src/count-tokens.ts and src/response/usage/estimate.ts). The docs said a bare ceil(chars / 4).
stream:false OpenAI Chat Completions delays now also cover combined content and tool-call replies and blocks replies.
jpr5
force-pushed
the
docs/r1-unreleased
branch
from
October 20, 2026 21:31
9b8e8bb to
c70ca9d
Compare
This was referenced Oct 20, 2026
Merged
jpr5
added a commit
that referenced
this pull request
Oct 21, 2026
Website check before v1.46.0 ships. One gap found: the **Fixture Options** reference table on `/fixtures` did not list the new `nonStreamingTiming` fixture field (#545, #561, #567). This PR adds that row. It states the `false` default and links to `/streaming-physics#non-streaming`. The rest of the site needed no change: - The homepage feature cards and comparison matrix make no per-endpoint claims that 1.46.0 changes. The matrix has no models-endpoint row on purpose (`isRowlessRule` in `scripts/update-competitive-matrix.ts`), and no row compares token counting. - #542, #551, #553, #560, #566, #567 and #568 already updated the auth, model-catalog, token-count, cache-usage, Ollama, AG-UI and streaming-physics pages. Their default statements match the shipped defaults. - Every new section is reachable from the per-page "On this page" TOC. - #562 bumps the homepage version banner. This PR does not touch it. Checks: `prettier --check`, `eslint .`, `tsdown` build, and the docs-clean-urls, docs-matrix-legend and mcp-fakes-doc-samples tests (188/188) all pass. I captured local Playwright screenshots of the edited table at 375x667, 430x932 and 1440x900, and the row renders correctly at all three. At narrow widths, the `/fixtures` page is wider than the viewport. The page on main is the same width, so this PR did not cause it.
jpr5
added a commit
that referenced
this pull request
Oct 21, 2026
> **DO NOT MERGE until Jordan says ship — merging publishes to npm.** > > `publish-release.yml` runs on every push to `main`. Merging this PR publishes npm > `@copilotkit/[email protected]`, the `v1.46.0` tag, the `v1` major-tag move, the GitHub Release, > the Docker images and the Slack announcement. Minor release npm/plugin **1.46.0** from `main` at 02c72c8 (#568 merged). Rebuilt on top of #563–#568. aimock-pytest keeps its own version (`pyproject.toml` unchanged); only its default aimock pin moves to 1.46.0, because this release adds server routes the pytest client can call. Every new behavior is additive or opt-in. The CHANGELOG has no `Changed` section. Defaults match v1.45.1: inbound-auth 401 bodies stay legacy (#566), non-streaming replies stay instant (#567), and shared `GET /v1/models` returns the OpenAI-format list for every header set (#568). The only default output changes are the bug fixes under Fixed. ## CHANGELOG ## [1.46.0] - 2026-10-20 ### Added - Gemini model list/detail, Anthropic model detail, and token-count routes (#542, #551) - Opt-in policies: `requiredHeaders`, native `authErrors`, native `modelCatalog` (#542, #566, #568) - Opt-in fixture `nonStreamingTiming: true` delays non-streaming OpenAI chat replies (#545, #567) - Anthropic/Bedrock cache usage kept in replay and record; Responses `phase` override (#531, #542) ### Fixed - Ollama embed batches, AG-UI thread/run IDs, empty MCP reads, Anthropic aborts (#533, #553, #557) ## What the bullets cover The `[Unreleased]` section had 16 entries, grouped into the 5 Slack-bound bullets above: - **Model routes (#542, #551):** Gemini `GET /v1beta/models` list/detail and the new `GET /v1/models/{id}` detail route, with provider paging and synthetic metadata; `count_tokens` / `:countTokens` estimates that never proxy or record. Anthropic `after_id`/`before_id` cursor validation applies only to the opt-in Anthropic list. - **Opt-in policies (#542, #566, #568):** all are off by default. Set them with the `policy` option, `llm.policy`, `--policy`, or the `X-AIMock-Policy` header. - `requiredHeaders: "enforce"` rejects Anthropic requests without `anthropic-version`. - `authErrors: "native"` returns provider-native 401 bodies on Anthropic Messages/count and Gemini/Vertex HTTP paths. The default `"legacy"` keeps `error.code: "invalid_api_key"`. - `modelCatalog: "native"` returns the Anthropic-format paged list on shared `GET /v1/models` for `anthropic-version` or `x-api-key`-only requests. The default `"legacy"` returns the 1.45 OpenAI-format list for every request. Anthropic SDK `models.list()` users must opt in. - **Opt-in non-streaming timing (#545, #561, #567):** OpenAI chat completions with `stream: false` only. A fixture with `nonStreamingTiming: true` plus a `streamingProfile` or `recordedTimings` delays the JSON reply by about its streamed duration (text, tool-call, combined content+tool-call and `blocks`). Without the field, `stream: false` replies return immediately, as in 1.45.1. - **Cache usage, phase (#531, #542):** Anthropic Messages and Bedrock Claude preserve fixture cache usage (with the TTL breakdown) in replay and record; Responses `phase` override (`commentary` | `final_answer`) on HTTP, SSE and WebSocket. - **Fixes (#533, #553, #557):** these are the only default output changes. Each one corrects output that real clients mishandled before. - Ollama `/api/embed` returns `embeddings: [[...]]` with one vector per input, and its errors are plain strings. Recorded embedding fixtures get optional `match.embeddingRequest` criteria. `/api/embeddings` keeps its legacy single-vector response. - AG-UI convenience builders echo the request's thread/run IDs and mint fresh message/tool-call IDs. Explicit event fixtures keep their authored IDs. - MCP `resources/read` for a resource with no content returns `"text": ""` and falls back to the definition's `mimeType`, so the response passes the MCP schema. - Anthropic Messages streaming stops on client disconnect. The journal records `interrupted: true` / `interruptReason: "client aborted"`. Left out of the bullets: the Bedrock SDK `NodeHttpHandler` example fix (#553, docs only). Not in the CHANGELOG: drift-sync, drift diagnostics, competitor-scan, adoption-wall, dependency and docs PRs (#532, #534, #535, #536, #541, #543, #546, #554, #555, #556, #558, #559, #560, #563, #564, #565). They do not change the published package. ## Versions | Surface | Before | After | |---|---|---| | `package.json` `version` | 1.45.1 | 1.46.0 | | `.claude-plugin/plugin.json` `version` | 1.45.1 | 1.46.0 | | `.claude-plugin/marketplace.json` `plugins[0].source.version` | ^1.45.1 | ^1.46.0 | | `charts/aimock/Chart.yaml` `appVersion` (chart `version` unchanged) | 1.45.1 | 1.46.0 | | `docs/index.html` CLI banner | aimock v1.45.1 | aimock v1.46.0 | | `packages/aimock-pytest/src/aimock_pytest/_version.py` `AIMOCK_VERSION` | 1.45.1 | 1.46.0 | | `packages/aimock-pytest/README.md` `--aimock-version` default | 1.45.1 | 1.46.0 | Left at 1.45.1 on purpose: CHANGELOG history; `src/__tests__/package-types-compat.test.ts`, which compiles a consumer against the published 1.45.1 types; and the `server.test.ts` comment that names the 1.45.1 default timing. `packages/aimock-pytest/pyproject.toml` keeps its own version. `CHANGELOG.md`: `[Unreleased]` became `[1.46.0] - 2026-10-20` with an empty `[Unreleased]` kept above it, as in prior releases. `package.json` `description` matches the README subtitle exactly (`publish-release.yml` re-syncs it on merge anyway). ## Local gates Run on the release commit tree (origin/main 02c72c8 + this commit): - `pnpm install --frozen-lockfile`: pass - `pnpm format:check`: pass - `pnpm lint`: pass - `pnpm typecheck`: pass - `pnpm build`: pass - `pnpm test`: pass (432 files; 17605 passed, 11 skipped), including `npm-publish-verify-workflow`, `unreleased-check-workflow`, `release-workflows`, `publish-pin-workflow`, `version` and `package-types-compat` - `pnpm test:exports` (publint + attw): pass - `pnpm api:report`: pass, 14 entries, `etc/` unchanged - `commitlint` on the release commit: pass - `unreleased-check.yml`: no `v1.46.0` tag exists, so the release push skips the check (by design)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs-only fill-in for gaps left by unreleased changes since v1.45.1. Each gap and its fix:
aimock-cli#required-header-policy(scope:/v1/messages,count_tokens, Anthropic-flavored/v1/models)claude-messages#model-catalogdocs/fixturesusageoverride row listed only OpenAI/Anthropic/Gemini token namescache_read_input_tokens,cache_creation_input_tokens,cache_creation, linked to a new#cache-usageanchor on Claude Messagesskills/write-fixturesendpoint table had no count/catalog routes, and listed/v1/modelsas OpenAI-onlycount_tokens,/v1/models/{id}, Gemini/v1beta/models[/{model}], plus a note on Anthropic catalog selection (anthropic-version, orx-api-keywithoutAuthorization)embeddingRequest; route table had no/api/embedinterruptReason: "client aborted"streamingProfileonstream: falselatencynever delays non-streaming repliesblocksreplies, per #545 and #561; summed per-chunk delays at the samechunkSize), alatencybullet saying barelatency/--latencynever delaysstream: false, and the same rule in skill gotchas #3/#4. Matches #545 head054a5ebbAlready covered by their own PRs (no change): #551 cursors/auth, #553 AG-UI IDs, Bedrock
NodeHttpHandler, Ollama page, #531 phase, #533resources/read.Checks
prettier --check .: passpnpm lint: passpnpm buildthen the doc-sample suitesmcp-fakes-doc-samples,aimock-cli,example-fixtures-loadableandunreleased-check-workflow: 84/84 pass