Skip to content

Use catalog-driven runtime model limits - #1

Merged
sambitcreate merged 1 commit into
mainfrom
codex/gemini-catalog-runtime-limits
Jul 24, 2026
Merged

sambitcreate merged 1 commit into
mainfrom
codex/gemini-catalog-runtime-limits

Conversation

@sambitcreate

Copy link
Copy Markdown
Owner

Summary

  • resolve non-Codex runtime limits from connection-discovered overrides, provider-scoped Pi models, the packaged models.dev snapshot, and conservative fallbacks
  • make the resolved runtime model the sole image-capability gate for generation and chat titles
  • harden the packaged catalog loader so it is shared, offline, and fail-closed

Why

Legacy non-Codex runtime models were hardcoded as text-only with a 128K context window, 8K output limit, and no reasoning. That throttled models such as Gemini 2.5 Pro despite Pi and Aiden's packaged catalog already carrying better capability metadata.

This follows Pi's built-in-provider behavior: provider-owned model metadata survives proxy base-URL routing, connection-discovered model fields act as overrides, and unrelated custom providers cannot borrow another provider's model metadata. The existing OpenAI-compatible Gemini transport is deliberately unchanged; native Google transport remains Phase 1.

Validation

  • npm run type-check
  • npm run lint
  • npm test — 629 TypeScript/JavaScript tests and 41 Rust tests
  • npm run build
  • two fresh independent adversarial review passes, both clean after fixes

@sambitcreate
sambitcreate marked this pull request as ready for review July 24, 2026 05:57
@sambitcreate
sambitcreate merged commit c4c096a into main Jul 24, 2026
1 check passed
@sambitcreate
sambitcreate deleted the codex/gemini-catalog-runtime-limits branch July 24, 2026 06:08
sambitcreate added a commit that referenced this pull request Oct 13, 2026
…e condition, and text-only reply recognition

This commit addresses three findings from code review:

1. [chat-pane #1] Observed phone-started turns are no longer suppressed when the chat's cached messages end in an assistant message from a different run. The suppression now checks if the last cached assistant message matches the observed run's generation ID, allowing new observed turns to display even in existing chats.

2. [observed-local-run #2] Fixed a race condition where an obsolete idle-release grace-period read could close a retained observer. After the async read completes, we now recheck the release authority flag before closing, so a retained observation survives if it was claimed by a newer turn.

3. [observed-local-run #3] Text-only replies without timeline fields are now recognized as the current run's saved reply by matching the doneMessageId from the persisted message. The hasReplyFrom predicate now checks both timeline.generationId (for multi-step replies) and doneMessageId (for text-only replies).

All observer lifecycle and chat visibility tests pass, including two new tests covering the release race condition and text-only reply handoff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant