Skip to content

fix(coding-agent): handle account-specific ChatGPT model defaults - #303

Merged
Pepps233 merged 1 commit into
mainfrom
fix/chatgpt-model-defaults
Oct 29, 2026
Merged

Pepps233 merged 1 commit into
mainfrom
fix/chatgpt-model-defaults

Conversation

@Pepps233

@Pepps233 Pepps233 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Original #296

Prefer gpt-5.6-terra when the active account actually lists it, and handle retired, restricted, or missing models across startup, login, and session restoration.

Available saved selections remain unchanged; this does not automatically upgrade existing users or assume that every account can use Terra.

Reasoning

Changing the default ID alone misses account-specific availability and the actual SDK restoration path. Previously, a stale saved model could be restored despite being filtered out for the active account, or fall back to a different provider even while ChatGPT still had usable models. Login also did not select a model when the session had no model, and rejected catalogs that lacked the hardcoded default.

Use the available catalog as the selection boundary. Prefer the provider's configured default when listed, otherwise preserve provider catalog order. Stay with the saved provider when it has available models, and retain existing settings/global fallback when it has none. No new model metadata, dependencies, or network requests are introduced.

Changes

  • Update the ChatGPT preferred default to gpt-5.6-terra; leave direct OpenAI defaults unchanged.
  • Share default selection between startup, restoration, custom-model metadata fallback, and login.
  • Validate saved/default session models against the available snapshot, not just catalog membership and provider auth.
  • Report replacement models without rewriting saved defaults during startup or restoration.
  • Handle first login, unknown placeholders, and models unavailable after switching accounts; preserve available current choices, including other providers.
  • Add resolver coverage and 22 faux-provider SDK/login regression cases, with network requests forbidden.
  • Document account-specific fallback behavior.

Testing

  • npm run check — passed.
  • ./test.sh — passed with isolated credentials; provider E2E tests remain skipped.
  • Focused resolver + new SDK/login regressions — 87 tests passed.
  • Baseline reproduction at ccb8ef518: seven SDK regression cases fail on unmodified main; the full 12-case SDK regression suite passes with this change.

Complete the default-selection fix proposed in #296 across startup, login, and session restoration while preserving available saved and custom models.
@Pepps233 Pepps233 self-assigned this Oct 29, 2026
@Pepps233
Pepps233 merged commit 7408266 into main Oct 29, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant