Avoid rewriting thinking/provider maps when values are unchanged so
mounted AI panels do not re-render. Put permission title and short
description on one line and drop the Cursor CLI parenthetical.
Stop advertising Gemini 3.7 Flash minimal, GPT-5.x-chat reasoning, and
Claude 4.7+ extended thinking. Map GPT-5 Off to minimal, send adaptive
effort on Claude 4.6+, and keep composer Enter on an exact or custom id.
Node's http.request falls back to Transfer-Encoding: chunked when no
Content-Length header is present. Both AI request paths pass the AI SDK's
headers through unchanged, and those headers carry no content-length (in the
browser fetch computes it), so every AI request body went out chunked.
The body is a fully-buffered string at that point, so its length is known.
Send an explicit Content-Length instead, measured with Buffer.byteLength so
multi-byte system prompts are not truncated.
Chunked request bodies are the less interoperable choice: on the plain-HTTP
path an HTTP proxy has to de-frame and re-serialize them, and some fail on
larger bodies. Xray's HTTP inbound drops the connection once the chunked body
exceeds roughly 8KB. Because Catty's system prompt plus tool definitions is
about 48KB, chat against an http:// provider behind a system HTTP proxy failed
with an opaque "socket hang up" while the connection test kept passing, since
that test issues GET /v1/models with no body and never exercises this path.
Adds three regression tests covering the streaming path, byte-accurate length
for multi-byte bodies, and the non-streaming path.
Closes#3083
Codex P2: switching to a catalog model dropped context_length, so
Catty budgeted 128k instead of the advertised window. Keep the
metadata on picker models and write it to modelContextWindows.
Codex P2: models whose menu includes Off still showed Off for users
with no stored preference, while the request sent no override. Leave
the chip unselected until the user picks a level.
Codex P2: missing agentThinkingMap was treated as Off, so GPT-5.1+
got reasoningEffort=none and Gemini 2.5 Flash got thinkingBudget=0
without a user choice. Store Off as an explicit value and leave an
absent preference unset so the provider default is used.
Codex P2: an empty agentThinkingMap was normalized to Off and then to
minimal, so every Gemini 3 Flash turn overrode the provider default.
Only send thinkingLevel when the user actually picked a level.
Codex P2: gpt-5-chat-latest matched the gpt-5 heuristic and received
reasoningEffort, which the OpenAI chat-only variants reject. Exclude
gpt-5-chat* from the thinking chip and request options.
Codex P2: agentThinkingMap was persisted locally but omitted from
collect/apply sync, so backups and other devices restored provider
and model without the chosen reasoning level.
Codex P2: hiding the custom-model row still left Enter falling back
to the typed query, which send-time validation then discarded. Only
use the query as a custom ID when Catty offers that action.
Codex P2: opening the composer on Gemini Pro persisted Low for users
who had never chosen a thinking level. Only remap an explicit stale
value; leave an empty preference unset so the request uses the
provider default.
Codex P2: pinning or recents in one parked ChatInput only updated that
instance. Subscribe every mounted composer so sibling terminals see
the same recent/pinned list without remounting.
Codex P2: gemini-3.1-pro-preview supports Medium, but Catty rewrote it
to High. Original Gemini 3 Pro still only has Low/High, so omit Medium
instead of silently converting it.
Codex P2: refreshed CLI catalogs still showed saved IDs that the
catalog no longer contains, then send-time validation swapped them.
Only Catty may keep a custom ID that is not in the live list.
Codex P2: a built-in provider with no stored baseURL never listed
live models even though chat still used the preset host. Fall back to
PROVIDER_PRESETS.defaultBaseURL before probing /models.
Codex P2: external-agent pickers advertised a custom ID that send-time
validation ignored. Offer Use custom model only for Catty providers.
Codex P2: the thinking budget was added to both compaction max output
and reservedTokens, so it was subtracted twice. Keep it only on
compaction max output.
Codex P2: medium/high thinking adds 10k/20k to the SDK max_tokens,
but pre-turn/step compaction still reserved only the 4,096 default.
Fold the selected thinking budget into output reserve and compaction
max output without changing the streamed maxTokens field.
Codex P2: Claude 3 Haiku still offered Low/Medium/High and would send
an enabled thinking budget. Gate the chip and the provider option on
Claude 3.7 / 4+ model ids. Also memoize Catty thinking levels.
Codex P2: switching away from Gemini 3 Flash left `minimal` selected
on models that do not advertise it. Persist a valid level for the new
model.
Codex P2: Gemini 3 Pro and 2.5 Pro cannot disable thinking, so Off
was a lie. Those menus only offer low/medium/high.
Codex P2: catalog cache ignored API key rotation, so a replaced
credential could keep the previous account's models. Fingerprint the
stored secret in the cache key.
Codex P2: Gemini 3 Flash cannot turn thinking off; Off was sending
thinkingLevel=minimal. Surface Minimal on the chip instead of Off.
Codex P1: o3/o4-mini/gpt-5 reject reasoning_effort=none. Only GPT-5.1+
get that Off mapping; older reasoning models omit the field.
Codex P2: Cursor ModelListItem.parameters.effort.values is the catalog
capability list. Use it when present instead of fabricating fallbacks
or dropping the thinking chip on unknown models.
Codex P2: OpenAI-style models such as gpt-4o rejected reasoning_effort
when the chip always offered Off/Low/Medium/High. Gate the chip and
the provider option on known reasoning model ids, and send explicit
none when Off is selected on a reasoning model.
Remove the provider divider and search-field outline in the sidebar
model picker. Size Save/Test/Cancel to the same h-8 box without
changing the global Button styles.
The Ollama preset always rewrote OpenAI-compat keys to the literal
"ollama" dummy. That is correct for local servers with no key, but it
replaced the IPC placeholder used for Cloud, so chat sent
Authorization: Bearer ollama and 401ed. Only fill the dummy when no key
is configured, and normalize a bare ollama.com origin to /v1.
Omit Gemini 3 Pro Off instead of sending unsupported minimal, clamp
medium to high, and merge advertised Cursor efforts with the fallback
table so CLI-listed gpt-5 still gets a thinking chip.
Do not rewrite bare CodeBuddy model ids to /medium, fail closed when
Google has no model id, and send Gemini 2.5 thinkingBudget instead of
Gemini 3 thinkingLevel.
Map Cursor effort variants and CodeBuddy SDK effort onto the shared
sidebar thinking chip, and send Gemini thinkingConfig for Catty
models that look like they support it.
Give Catty a two-column provider/model menu in the composer, add search
plus recent/pinned models, and move thinking effort onto its own chip
so Claude, Codex, Grok, and Catty share the same compact controls.
Closes#2137Closes#2637Closes#1884
Closes#3078
OpenAI-compatible providers always used Chat Completions. Some
relays cache poorly on that path. Add a per-provider Responses
opt-in so Catty can call /v1/responses while keeping Chat
Completions as the default.