Skip to content

Release v0.51.210 — Release GD (stage-batch1: model-picker multi-slash fix + extensionless preview highlighting)#3380

Merged
nesquena-hermes merged 3 commits into
masterfrom
release/stage-batch1
Jun 2, 2026
Merged

Release v0.51.210 — Release GD (stage-batch1: model-picker multi-slash fix + extensionless preview highlighting)#3380
nesquena-hermes merged 3 commits into
masterfrom
release/stage-batch1

Conversation

@nesquena-hermes
Copy link
Copy Markdown
Collaborator

Release v0.51.210 — Release GD (stage-batch1)

Two low-risk contributor bug fixes, batched.

Fixed

Gates

  • Full sequential pytest suite: 7267 passed, 0 failed (7 skipped, 3 xpassed).
  • Pre-Opus gate: node -c, ast.parse, ESLint runtime gate, ruff forward gate — all clean.
  • Codex regression gate: SAFE TO SHIP (verified model-id normalization edge cases — cross-provider same-bare-name, single-slash, @provider:, custom proxy, Ollama tags — and the workspace cross-file Prism leak guard).

Note

A third PR (#3371, active-stream SSE activity replay) was dropped from this batch: both the Codex gate and an empirical repro confirmed it can deliver the same event twice (journal replay + StreamChannel offline-buffer drain) to a late subscriber on an active stream. Held with changes-requested + repro for a cursor-safe rework.

b3nw and others added 3 commits June 2, 2026 05:08
When a custom/proxy provider serves models whose IDs share the same base
name across vendor prefixes (e.g. vendor_a/deepseek/deepseek-v4-pro vs
vendor_b/deepseek/deepseek-v4-pro), several normalization functions use
split('/').pop() (or split('/')[-1]) which discards all segments except
the last.  This causes three user-facing symptoms: (1) clicking one
model selects a different colliding model, (2) configured-model badges
attach to the wrong dropdown entry, and (3) the model-chip label in the
composer bar is truncated to just the base model name.

Root cause: all three callers take only the last slash-segment instead
of stripping only the first (provider) segment and preserving the
remaining vendor hierarchy.

Fix 1 — _findModelInDropdown (static/ui.js): Move the exact string match
before the provider-aware normalized match.  Previously, when all models
share the same provider ID (common with LLM proxy setups), the normalized
match returned whichever colliding option appeared first in DOM order,
even though an exact match existed.

Fix 2 — _normalizeConfiguredModelKey (static/ui.js) and _norm_model_id
(api/config.py): Replace split('/').pop() / split('/')[-1] with a first-
segment-only strip (regex on frontend, split('/',1) on backend), matching
the strategy already used by _findModelInDropdown's norm lambda.  This
prevents multi-slash IDs from colliding in badge assignment and the
configured-entry dedup set.  Additionally, strip colon-qualified provider
prefixes (e.g. custom:name/) before the slash strip so badge-key variants
like 'custom:llm-proxy/opencode_go/model' merge correctly with the bare
'opencode_go/model' in the configured section dedup.

Fix 3 — getModelLabel (static/ui.js) and _get_label_for_model
(api/config.py): Same split('/').pop() to first-segment-strip change so
the composer-bar model chip and backend label preserve vendor context
(e.g. shows 'opencode_go/deepseek-v4-pro' instead of 'deepseek-v4-pro').

Verification: 9 new regression tests (test_issue3360) covering exact-
match priority, multi-slash normalization, and backend/frontend parity.
Updated 1 existing test (test_norm_model_id_trailing_empty_guard) that
asserted the old split('/').pop() pattern.  All 25 related tests pass.

AI Usage: Gemini (gemini-2.5-pro), via Antigravity IDE, pair-programmed.

(cherry picked from commit a454fec)
@nesquena-hermes nesquena-hermes merged commit 4baa26b into master Jun 2, 2026
11 checks passed
@nesquena-hermes nesquena-hermes deleted the release/stage-batch1 branch June 2, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants