code-yeongyu / code-yeongyu/senpi

[Bug]: openai-codex context limits require per-model manual overrides

Open
#1,144 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
429
Forks
98
Avg merge
5h 3m
Merged PRs (30d)
526

Description

### What happened?

The core `openai-codex` catalog reports static context limits even when the authenticated account exposes larger limits for the same models. With extensions disabled, Luna, Sol, and Terra report 272K / 128K. The authoritative OpenAI Codex catalog used by another local pi client on the same account reports 1,000,000 / 128,000 for all three.

This makes adaptive compaction start around 176.8K instead of 650K. `modelOverrides` fixes current IDs, but requires manual maintenance whenever limits or model IDs change.

### Steps to reproduce

1. Run the Senpi CLI without extensions:

node path/to/senpi/dist/cli.js -ne --list-models

2. Observe:

openai-codex gpt-5.6-luna 272K 128K
openai-codex gpt-5.6-sol 272K 128K
openai-codex gpt-5.6-terra 272K 128K

3. Compare with the capability catalog for the same authenticated OpenAI Codex account, which reports 1M / 128K for these IDs.

No user extension is loaded in the failing command.

### Expected behavior

At startup or reload, the provider should discover and merge the maximum capabilities supported by the authenticated account for every `openai-codex` model. Shared IDs should update context/output limits while preserving Senpi-specific compatibility metadata; newly discovered IDs should be added; existing built-in IDs missing from a remote snapshot should not disappear. Static metadata can remain the fallback when discovery is unavailable.

### Version

`@code-yeongyu/senpi` 2026.8.26-2

Contributor guide

Open the contributing guide

Research direction

Start with the Senpi CLI model-listing path shown by `node path/to/senpi/dist/cli.js -ne --list-models`, then trace how the `openai-codex` catalog and `modelOverrides` provide capabilities. Compare that flow with the authenticated capability catalog and define tests for merging shared IDs, adding discovered IDs, retaining missing built-ins, and falling back to static metadata when discovery is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.