Shadow-call intercept: option to follow the conversation's model

Aperta
#9,096 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
64/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
api, backend

Direzione di ricerca

Start from the shadow-call intercept code path and the ocx models shadow set CLI handler that currently accepts a fixed target; trace how an intercepted helper call selects its model and where intercept_target_unavailable is raised (#5618). Add an opt-in follow-conversation setting there while preserving fixed-target priority, then cover both cases with tests around shadow routing. Done means a helper call from an anthropic/claude-sonnet-5-5 thread is answered by that model when enabled, while a set fixed target and its failover behave as before.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement proxy
Area

Proxy and routing

What are you trying to accomplish?

I use Claude models in Codex App. The app sends its title and activity-summary helper calls to a hardcoded gpt-6-luna. When my OpenAI quota is used up, these calls fail and the thread keeps the first user message as its title. I want these helper calls to use the model of the conversation they belong to.

What prevents this today?

The shadow-call intercept can reroute these calls, but it needs one fixed target model, and it is off with an empty target by default. A fixed target also means that GPT chats get their titles from that same model. If the target becomes unavailable, the call fails with 409 intercept_target_unavailable, by design (#5618).

What should OpenCodex do?

With an opt-in setting, an intercepted helper call is routed to the model that the conversation uses. A fixed target (or a combo with its own failover) keeps priority when it is set. Behaviour for unavailable fixed targets stays unchanged.

Example usage or interface
ocx models shadow set --follow-conversation on

The flag name is only an illustration. Result: a helper call from a thread using anthropic/claude-sonnet-5-5 is answered by that model instead of gpt-6-luna.

Alternatives or workarounds

ocx models shadow set anthropic/claude-haiku-5-5 --enabled on works but uses one model for all conversations.

Additional context

In my local ocx logs there are 49 responses with 429 and 16 with 502 or 504, and about half of my recent Claude threads show the raw first message as title. Related: #2157, #5618, #4129.

Checks
  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.
Lingua principale
TypeScript
Stelle
16.9k
Fork
1.3k
Merge medio
1g 4h
PR unite (30g)
814

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lidge-jun/opencodex

Tutte le issue di lidge-jun/opencodex

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.