Summary
Onboarding GitHub Models via /onboard-github fails using the device code method due to an invalid_scope error. While Personal Access Token (PAT) onboarding completes, the CLI becomes unusable, throwing a "Request too large" error for simple messages and crashing with a TypeError when running /model.
Steps to Reproduce
-
Run /onboard-github using the device code method.
-
Attempt a workaround by using a PAT for onboarding.
-
Once "successfully" onboarded, try to send a simple message like "Hi".
-
Run the /model command to switch or verify models.
Expected Behavior
-
Device code onboarding should successfully request and authorize the necessary scopes.
-
After PAT onboarding, the application should allow sending messages and switching models without crashing.
Actual Behavior
-
Device Code Auth: Fails with: "Device code request failed: 400 {"error":"invalid_scope","error_description":"The scopes requested are invalid:models:read.","error_uri":"https://docs.github.com"}"
-
Messaging: Every message (even simple text) triggers: Request too large (max 20MB). Double press esc to go back and try with a smaller file.
-
/model command: The CLI crashes with a TypeError: Cannot read properties of undefined (reading 'trim') at parseUserSpecifiedModel.
Environment
-
OpenClaude version: v0.1.7
-
OS: macOS 26.4
-
Terminal: Ghostty
-
Provider: GitHub Models (intended)
-
Model: None (cannot select due to crash)
Logs / Screenshots
Plaintext
ERROR
Cannot read properties of undefined (reading 'trim')
at parseUserSpecifiedModel (file:///opt/homebrew/lib/node_modules/@gitlawb/openclaude/dist/cli.mjs:108601:40)
at renderDefaultModelSetting (file:///opt/homebrew/lib/node_modules/@gitlawb/openclaude/dist/cli.mjs:108491:26)
at getDefaultOptionForUser (file:///opt/homebrew/lib/node_modules/@gitlawb/openclaude/dist/cli.mjs:343668:54)
at getModelOptionsBase (file:///opt/homebrew/lib/node_modules/@gitlawb/openclaude/dist/cli.mjs:343933:26)
at getModelOptions (file:///opt/homebrew/lib/node_modules/@gitlawb/openclaude/dist/cli.mjs:344012:20)
at ModelPicker (file:///opt/homebrew/lib/node_modules/@gitlawb/openclaude/dist/cli.mjs:385782:10)
Additional Context
Summary
Onboarding GitHub Models via
/onboard-githubfails using the device code method due to aninvalid_scopeerror. While Personal Access Token (PAT) onboarding completes, the CLI becomes unusable, throwing a "Request too large" error for simple messages and crashing with aTypeErrorwhen running/model.Steps to Reproduce
Run
/onboard-githubusing the device code method.Attempt a workaround by using a PAT for onboarding.
Once "successfully" onboarded, try to send a simple message like "Hi".
Run the
/modelcommand to switch or verify models.Expected Behavior
Device code onboarding should successfully request and authorize the necessary scopes.
After PAT onboarding, the application should allow sending messages and switching models without crashing.
Actual Behavior
Device Code Auth: Fails with:
"Device code request failed: 400 {"error":"invalid_scope","error_description":"The scopes requested are invalid:models:read.","error_uri":"https://docs.github.com"}"Messaging: Every message (even simple text) triggers:
Request too large (max 20MB). Double press esc to go back and try with a smaller file./modelcommand: The CLI crashes with aTypeError: Cannot read properties of undefined (reading 'trim')atparseUserSpecifiedModel.Environment
OpenClaude version: v0.1.7
OS: macOS 26.4
Terminal: Ghostty
Provider: GitHub Models (intended)
Model: None (cannot select due to crash)
Logs / Screenshots
Plaintext
Additional Context
Restarting
openclaudedoes not resolve the issue.The errors persist even after the tool indicates the token was stored correctly in secure storage.