Skip to content

[v3.8.50] fix(api): retry Codex image generation by account — conflict resolved - #8477

Closed
herjarsa wants to merge 2 commits into
cheaper-inference:release/v3.8.50from
herjarsa:fix/8307-codex-image-fallback-rebased
Closed

herjarsa wants to merge 2 commits into
cheaper-inference:release/v3.8.50from
herjarsa:fix/8307-codex-image-fallback-rebased

Conversation

@herjarsa

Copy link
Copy Markdown
Contributor

Conflict-resolved rebase of upstream PR #8307. Cherry-picked 317799c (fix(api): retry Codex image generation by account) onto latest upstream/release/v3.8.49 (36f8fd1). No conflicts encountered.

@herjarsa
herjarsa requested a review from diegosouzapw as a code owner July 24, 2026 21:30
@diegosouzapw diegosouzapw added duplicate This issue or pull request already exists manual-review Aguardando revisão manual do dono (scope/contaminação) labels Jul 25, 2026
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thanks for taking the time to rebase this and resolve the conflicts — that work is genuinely useful, and I checked that you preserved the original commit authorship rather than re-attributing it.

Here's how we're going to land it, though. #8307 (by @fenix007) is still open and is the PR that carries this change originally. If we merge this one instead, GitHub gives the "Merged" badge here and leaves #8307 stranded — the original author ends up with no credit for work that is theirs. Our contributing policy is to resolve conflicts inside the original author's branch and merge that PR.

So we'll apply your conflict resolution to #8307 and merge it there. This PR is labelled duplicate and stays open for now — we won't close it without the maintainer's explicit call.

To be clear: this is not a rejection of your work. The rebase you did is exactly what #8307 needed, and it's what will get pushed there. Thank you.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Correcting my earlier note on this one: I re-checked directly against the current release/v3.8.49 tip and the Codex retry-by-account logic (the isCodexChatGptModelAccessError check, the connectionId threading, the fallback-credentials retry) is not present anywhere in imageGeneration.ts or the images/generations route — so this isn't subsumed. Since the fix genuinely hasn't landed, I'd rather we resolve the rebase conflict directly on the original PR (#8307 by @fenix007) so the credit for the fix stays with them. Thanks for putting together the rebase either way — it made it much easier to see exactly what's still missing.

…ests into dedicated file

The Codex account-fallback tests from PR cheaper-inference#8477 (rebase of cheaper-inference#8307) push the
shared image-generation-route test file above the 800-line testCap from
config/quality/file-size-baseline.json. Extract the 5 new tests
(skips-excluded-model, retries-one-sibling, no-retry-ordinary-400,
stops-after-one-fallback, attributes-call-logs) plus their shared
fixtures into tests/unit/image-generation-route-codex-account-fallback.test.ts
to keep both files well under the cap. No production code touched;
all 21 tests still pass.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
@diegosouzapw diegosouzapw added the deferred-v3.8.50 Adiada para o ciclo v3.8.50 (validacao VPS, refactor, ou escopo grande) label Jul 28, 2026
@diegosouzapw diegosouzapw changed the title fix(api): retry Codex image generation by account — conflict resolved [v3.8.50] fix(api): retry Codex image generation by account — conflict resolved Jul 28, 2026
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Heads-up: this PR is running against a stale base

release/v3.8.49 has moved 224 commits ahead of the base this PR was last built against, and several gate failures that were red on the older base have since been repaired on the branch itself:

Gate class Repaired by
No new ESLint warnings (exit 2 — orphaned suppressions, not a lint violation) #8706, #8831
Fast Quality Gates / check:file-size / Quality Ratchet #8585, #8767, plus the post-merge-train re-pins
Docs Gates (fast-path) (missing Polish API_REFERENCE) #8831
backoff-clamp + compressionDetailNormalizers unit tests #8706

I verified this on a clean checkout of the current tip (3b515d90b3): lint:json --max-warnings 0, check:file-size, check:docs-sync, error-classification.test.ts (24/24) and check-db-rules.test.ts (22/22) all pass with no changes.

Currently failing here:

  • Fast Quality Gates

Please update the branch (the Update branch button, or rebase onto origin/release/v3.8.49) and let CI re-run. That should clear any failure caused by the stale base.

Note this is not a promise that every red disappears — a failure specific to the changes in this PR will survive the rebase, and Build (advisory) is advisory and does not block. Rebasing just removes the noise so what is left is actually yours.

No action was taken on this PR beyond this comment.

@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.49 to release/v3.8.50 July 28, 2026 18:42
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Re-homed to release/v3.8.50: v3.8.49 entered its release freeze, so the branch now belongs to the release captain and development continues on the next cycle. Nothing is wrong with this PR — it just needed a live base. No action needed from you; CI will re-run against the new base.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Obrigado pela entrega! Esta PR segue uma estratégia de rebase de trabalho derivado e não preserva corretamente o fluxo de crédito original para essa mudança.\n\nPara manter rastreabilidade e evitar impacto no histórico, vamos seguir pelo PR canônico.\n\nSe você quiser, pode abrir um PR novo e bem focado com a mesma correção, sem duplicação/rebase de terceiros.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Closed por solicitação do maintainer: rebase de contribuição canônica em fluxo de autoria preservada. Obrigado e reabra de forma nova e focada se ainda quiser contribuir nessa mudança.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deferred-v3.8.50 Adiada para o ciclo v3.8.50 (validacao VPS, refactor, ou escopo grande) duplicate This issue or pull request already exists manual-review Aguardando revisão manual do dono (scope/contaminação)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants