FN-6158: handle Codex auth-tier model incompatibility

Gracefully recover from unsupported Codex model selections on ChatGPT-account auth tiers.

- detect Codex and general model-auth-tier incompatibility errors as retryable model-selection failures
- trigger configured fallback models during session creation and prompt-time retries, with actionable operator guidance when no fallback works
- document the expanded fallback behavior and add engine regression coverage plus a CLI changeset

Files changed:
 .changeset/fn-6158-model-compatibility-fallback.md |   5 +
 docs/settings-reference.md                         |   2 +-
 .../pi-prompt-session-and-check-recursion.test.ts  |  25 ++++
 packages/engine/src/__tests__/pi.test.ts           | 136 ++++++++++++++++++++-
 .../src/__tests__/transient-error-detector.test.ts |  24 ++++
 packages/engine/src/pi.ts                          |  21 +++-
 packages/engine/src/transient-error-detector.ts    |  24 ++++
 7 files changed, 234 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-6158
Fusion-Task-Lineage: 3e91f647-40f1-4296-afa4-40861310e1c1
This commit is contained in:
gsxdsm
2026-06-09 21:16:42 -07:00
parent 1c49ae6b7c
commit 4435ca2c54
7 changed files with 234 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ Defaults from `DEFAULT_GLOBAL_SETTINGS`; key scope from `GLOBAL_SETTINGS_KEYS`.
| `dashboardFontScalePct` | `number` | `100` | Dashboard font scale percentage used by Appearance settings. Valid range: `85` to `125`; applied pre-hydration via document root font-size so board typography (column headers/counts, task cards, and quick-entry text) scales with the setting from first paint. |
| `defaultProvider` | `string` | `undefined` | Default AI provider. |
| `defaultModelId` | `string` | `undefined` | Default AI model ID. |
| `fallbackProvider` | `string` | `undefined` | Fallback provider when the primary default model hits transient provider failures. |
| `fallbackProvider` | `string` | `undefined` | Fallback provider when the primary default model hits transient provider failures or model-compatibility/auth-tier rejections. |
| `fallbackModelId` | `string` | `undefined` | Fallback model ID (must pair with `fallbackProvider`). |
| `defaultThinkingLevel` | `"off" \| "minimal" \| "low" \| "medium" \| "high"` | `undefined` | Default reasoning effort for AI sessions. If a provider/runtime rejects simultaneous `thinking` and `reasoning_effort` parameters, Fusion retries without the explicit thinking override instead of failing the run. |
| `ntfyEnabled` | `boolean` | `false` | Enable ntfy push notifications. |