Skip to content

Fix ChatGPT subscription model in byteask.ps1 - #4

Open
h30s wants to merge 1 commit into
ByteAsk:mainfrom
h30s:fix/ps1-subscription-model
Open

h30s wants to merge 1 commit into
ByteAsk:mainfrom
h30s:fix/ps1-subscription-model

Conversation

@h30s

@h30s h30s commented Oct 4, 2026

Copy link
Copy Markdown

Fixes #3

Summary of Changes

  • Omit managed model in subscription config (byteask.ps1):
    • In Invoke-ByokSubscription, leave $model empty rather than defaulting to 'gpt-5.4' (matching the behavior in byteask:1257-1259). This allows byteask-engine to resolve a valid default model against OpenAI's live ChatGPT catalog instead of failing with Model metadata for 'gpt-5.4' not found.
    • In Write-SubscriptionConfig, emit model = "$model" only when $model is non-empty, preventing invalid model = "" lines.
  • Preserve catalog when switching back (byteask.ps1):
    • In Invoke-ByokOff, fall back to $BYTEASK_HOME/models-catalog.json when model_catalog_json was dropped by a prior subscription session, preventing the catalog from being permanently dropped.
  • Regression test (tests/test_subscription.ps1):
    • Verifies Write-SubscriptionConfig omits the model = line when empty.
    • Verifies custom models are preserved when passed.
    • Verifies Invoke-ByokOff restores model_catalog_json.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

byteask.ps1: ChatGPT subscription session carries managed model, causing turns to fail

1 participant