senpi icon indicating copy to clipboard operation
senpi copied to clipboard

Prefer leading developer input for reusable GPT-6.2 instructions on Legacy Codex

Open roian6 opened this issue 5 days ago • 2 comments

What do you want to change?

For GPT-6.2 Astra/Sol on chatgpt-subscription Legacy sign-in (openai-codex-responses), put the reusable system prompt once in a leading developer input item, if the legacy route accepts that shape. Leave SIWC, older models and other backends unchanged.

Why?

OpenAI's caching guide says GPT-6.2+ renders top-level instructions after input, outside the reusable prefix. I used the mock-fetch pattern from chatgpt-subscription-cache-affinity.test.ts: send one synthetic user turn with gpt-6.2-astra and a unique system prompt, then inspect the decoded POST body. On both v2026.11.23 and main (92685f2850), Legacy sent the prompt only in instructions; the SIWC control put it in the first developer item. No live model or pi -ne CLI run. This is a serialization optimization proposal, not a measured Legacy quota regression or a fix for #7497.

How? (optional)

Use the leading input pattern from Hermes #157705. Verify Legacy backend acceptance and cache reads, plus SSE, WebSocket continuation/fallback and native compaction replay before enabling it. Leave the cache key alone (#7268 is a separate change).

roian6 avatar Nov 28 '26 00:11 roian6

AI assistance disclosure: I used an LLM to help prepare the offline request fixture and draft this report from its observed results.

roian6 avatar Nov 28 '26 00:11 roian6

Adding a small live Legacy Codex measurement (2026-12-01), using senpi 2026.11.30-3 through omo-ai 5.1.90. Each cell is uncached input / cache-read tokens; input here excludes cached tokens.

Turn gpt-6.2-astra, priority gpt-6.2-astra, tier omitted gpt-6.1-sol, tier omitted
1 7,122 / 4,096 7,122 / 4,096 7,240 / 3,968
2 7,204 / 4,096 7,204 / 4,096 282 / 11,008
3 7,542 / 3,840 7,286 / 4,096 236 / 11,136
4 7,358 / 4,096 7,358 / 4,096 180 / 11,264
5 7,434 / 4,096 7,690 / 3,840 256 / 11,264
6 7,505 / 4,096 7,505 / 4,096 199 / 11,392
Total 44,165 / 24,320 44,165 / 24,320 8,393 / 60,032
  • Provider: chatgpt-subscription Legacy (openai-codex-responses); all outgoing requests used reasoning.effort: medium. Only the priority run sent service_tier: priority; the other two omitted that field.
  • One run per configuration: five sequential read calls on the same small file, then DONE (six model turns each, 18 total). All completed successfully. Operating extensions, skills and context files were disabled; a probe recorded request metadata.
  • The 24,358-character top-level instructions, tool definitions and first input item had identical SHA-256 hashes across all 18 requests. History grew by appending results (2 to 12 input items). The cache key stayed fixed within each run; both Astra runs shared a key, while Sol's differed by model.

Both Astra runs retained roughly 7,000 uncached input tokens per turn; Sol fell to 180-282 after turn one. This is a small observation, not proof that moving instructions fixes Legacy caching. Server-reported actual tier, Legacy acceptance of the proposed leading developer input, and output quality were not tested.

AI assistance disclosure: an LLM assisted with measurements and drafting; posting was authorized by the account owner.

Tygb99 avatar Dec 01 '26 06:12 Tygb99