GPT-5 Unsupported parameter reasoning.effort #1261

Closed
opened 2026-02-16 17:30:11 -05:00 by yindo · 12 comments
Owner

Originally created by @Salmin on GitHub (Aug 12, 2025).

Originally assigned to: @thdxr on GitHub.

I can't use GPT-5
Cleaning .cache/opencode doesn't help
AI_APICallError: Unsupported parameter: 'reasoning.effort' is not supported with this model.

opencode v0.4.26
API provider: OpenAI

Originally created by @Salmin on GitHub (Aug 12, 2025). Originally assigned to: @thdxr on GitHub. I can't use GPT-5 Cleaning .cache/opencode doesn't help AI_APICallError: Unsupported parameter: 'reasoning.effort' is not supported with this model. opencode v0.4.26 API provider: OpenAI
yindo closed this issue 2026-02-16 17:30:11 -05:00
Author
Owner

@Askath commented on GitHub (Aug 12, 2025):

Same issue for me, but only when using "opencode run"

@Askath commented on GitHub (Aug 12, 2025): Same issue for me, but only when using "opencode run"
Author
Owner

@thdxr commented on GitHub (Aug 12, 2025):

this working for me - what is the version here cat ~/.cache/opencode/node_modules/@ai-sdk/openai/package.json

@thdxr commented on GitHub (Aug 12, 2025): this working for me - what is the version here `cat ~/.cache/opencode/node_modules/@ai-sdk/openai/package.json`
Author
Owner

@Salmin commented on GitHub (Aug 12, 2025):

what is the version

cat ~/.cache/opencode/node_modules/@ai-sdk/openai/package.json

{
  "name": "@ai-sdk/openai",
  "version": "2.0.10",
  "license": "Apache-2.0",
  "sideEffects": false,
  "main": "./dist/index.js",
  "module": "./dist/index.mjs",
  "types": "./dist/index.d.ts",
  "files": [
    "dist/**/*",
    "CHANGELOG.md",
    "internal.d.ts"
  ],
  "exports": {
    "./package.json": "./package.json",
    ".": {
      "types": "./dist/index.d.ts",
      "import": "./dist/index.mjs",
      "require": "./dist/index.js"
    },
    "./internal": {
      "types": "./dist/internal/index.d.ts",
      "import": "./dist/internal/index.mjs",
      "module": "./dist/internal/index.mjs",
      "require": "./dist/internal/index.js"
    }
  },
  "dependencies": {
    "@ai-sdk/provider": "2.0.0",
    "@ai-sdk/provider-utils": "3.0.1"
  },
  "devDependencies": {
    "@types/node": "20.17.24",
    "tsup": "^8",
    "typescript": "5.8.3",
    "zod": "3.25.76",
    "@vercel/ai-tsconfig": "0.0.0"
  },
  "peerDependencies": {
    "zod": "^3.25.76 || ^4"
  },
  "engines": {
    "node": ">=18"
  },
  "publishConfig": {
    "access": "public"
  },
  "homepage": "https://ai-sdk.dev/docs",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/vercel/ai.git"
  },
  "bugs": {
    "url": "https://github.com/vercel/ai/issues"
  },
  "keywords": [
    "ai"
  ],
  "scripts": {
    "build": "pnpm clean && tsup --tsconfig tsconfig.build.json",
    "build:watch": "pnpm clean && tsup --watch",
    "clean": "rm -rf dist *.tsbuildinfo",
    "lint": "eslint \"./**/*.ts*\"",
    "type-check": "tsc --build",
    "prettier-check": "prettier --check \"./**/*.ts*\"",
    "test": "pnpm test:node && pnpm test:edge",
    "test:update": "pnpm test:node -u",
    "test:watch": "vitest --config vitest.node.config.js",
    "test:edge": "vitest --config vitest.edge.config.js --run",
    "test:node": "vitest --config vitest.node.config.js --run"
  }
}
@Salmin commented on GitHub (Aug 12, 2025): > what is the version cat ~/.cache/opencode/node_modules/@ai-sdk/openai/package.json ``` { "name": "@ai-sdk/openai", "version": "2.0.10", "license": "Apache-2.0", "sideEffects": false, "main": "./dist/index.js", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "files": [ "dist/**/*", "CHANGELOG.md", "internal.d.ts" ], "exports": { "./package.json": "./package.json", ".": { "types": "./dist/index.d.ts", "import": "./dist/index.mjs", "require": "./dist/index.js" }, "./internal": { "types": "./dist/internal/index.d.ts", "import": "./dist/internal/index.mjs", "module": "./dist/internal/index.mjs", "require": "./dist/internal/index.js" } }, "dependencies": { "@ai-sdk/provider": "2.0.0", "@ai-sdk/provider-utils": "3.0.1" }, "devDependencies": { "@types/node": "20.17.24", "tsup": "^8", "typescript": "5.8.3", "zod": "3.25.76", "@vercel/ai-tsconfig": "0.0.0" }, "peerDependencies": { "zod": "^3.25.76 || ^4" }, "engines": { "node": ">=18" }, "publishConfig": { "access": "public" }, "homepage": "https://ai-sdk.dev/docs", "repository": { "type": "git", "url": "git+https://github.com/vercel/ai.git" }, "bugs": { "url": "https://github.com/vercel/ai/issues" }, "keywords": [ "ai" ], "scripts": { "build": "pnpm clean && tsup --tsconfig tsconfig.build.json", "build:watch": "pnpm clean && tsup --watch", "clean": "rm -rf dist *.tsbuildinfo", "lint": "eslint \"./**/*.ts*\"", "type-check": "tsc --build", "prettier-check": "prettier --check \"./**/*.ts*\"", "test": "pnpm test:node && pnpm test:edge", "test:update": "pnpm test:node -u", "test:watch": "vitest --config vitest.node.config.js", "test:edge": "vitest --config vitest.edge.config.js --run", "test:node": "vitest --config vitest.node.config.js --run" } } ```
Author
Owner

@thdxr commented on GitHub (Aug 12, 2025):

do you have any additional config?

@thdxr commented on GitHub (Aug 12, 2025): do you have any additional config?
Author
Owner

@Salmin commented on GitHub (Aug 12, 2025):

do you have any additional config?

No, fresh installation.

@Salmin commented on GitHub (Aug 12, 2025): > do you have any additional config? No, fresh installation.
Author
Owner

@vitorfdl commented on GitHub (Aug 12, 2025):

Pick the gpt-5 option instead of gpt-5-latest. It worked for me

@vitorfdl commented on GitHub (Aug 12, 2025): Pick the gpt-5 option instead of gpt-5-latest. It worked for me
Author
Owner

@rekram1-node commented on GitHub (Aug 12, 2025):

made PR, should fix

@rekram1-node commented on GitHub (Aug 12, 2025): made PR, should fix
Author
Owner

@f5epcim commented on GitHub (Aug 13, 2025):

on 0.4.37, and private openai azure endpoint:

  • I see error with 'reasoningEffort'. Did you mean 'reasoning_effort'
  • I see "text_verbosity":"low" being sent 2x ( I do have it this way 'text_verbosity' specified in subagent ), it's not unified on requestBodyValues.

Partial log:

ERROR 2025-08-13T05:51:31 +5643ms service=session session=ses_75e04927cffennnv5Mz3Erx5Jf error={"error":{"name":"AI_APICallError","url":"......
....
"requestBodyValues":{"model":"gpt-5","max_tokens":32000,"reasoningEffort":"minimal","textVerbosity":"low","name":"myTravelAgent","reasoning_effort":"minimal","text_verbosity":"low","messages":[{"role":"system","content":"You are an AI .......
...
,"responseBody":"{\"detail\":\"litellm.BadRequestError: AzureException BadRequestError - Unknown parameter: 'reasoningEffort'. Did you mean 'reasoning_effort'?. Received Model Group=gpt-5\\nAvailable Model Group Fallbacks=None\"}","isRetryable":false}
INFO  2025-08-13T05:51:31 +1ms service=bus type=session.error publishing
ERROR 2025-08-13T05:51:31 +3ms service=tui message=AI_APICallError: Bad Request name=UnknownError Server error
INFO  2025-08-13T05:51:31 +0ms service=bus type=storage.write publishing
INFO  2025-08-13T05:51:31 +0ms service=bus type=message.updated publishing
@f5epcim commented on GitHub (Aug 13, 2025): on 0.4.37, and private openai azure endpoint: - I see error with `'reasoningEffort'. Did you mean 'reasoning_effort'` - I see `"text_verbosity":"low"` being sent 2x ( I do have it this way 'text_verbosity' specified in subagent ), it's not unified on requestBodyValues. Partial log: ``` ERROR 2025-08-13T05:51:31 +5643ms service=session session=ses_75e04927cffennnv5Mz3Erx5Jf error={"error":{"name":"AI_APICallError","url":"...... .... "requestBodyValues":{"model":"gpt-5","max_tokens":32000,"reasoningEffort":"minimal","textVerbosity":"low","name":"myTravelAgent","reasoning_effort":"minimal","text_verbosity":"low","messages":[{"role":"system","content":"You are an AI ....... ... ,"responseBody":"{\"detail\":\"litellm.BadRequestError: AzureException BadRequestError - Unknown parameter: 'reasoningEffort'. Did you mean 'reasoning_effort'?. Received Model Group=gpt-5\\nAvailable Model Group Fallbacks=None\"}","isRetryable":false} INFO 2025-08-13T05:51:31 +1ms service=bus type=session.error publishing ERROR 2025-08-13T05:51:31 +3ms service=tui message=AI_APICallError: Bad Request name=UnknownError Server error INFO 2025-08-13T05:51:31 +0ms service=bus type=storage.write publishing INFO 2025-08-13T05:51:31 +0ms service=bus type=message.updated publishing ```
Author
Owner

@Salmin commented on GitHub (Aug 13, 2025):

made PR, should fix

v0.0.41 still AI_APICallError: Unsupported parameter: 'reasoning.effort' is not supported with this model.

@Salmin commented on GitHub (Aug 13, 2025): > made PR, should fix v0.0.41 still AI_APICallError: Unsupported parameter: 'reasoning.effort' is not supported with this model.
Author
Owner

@f5epcim commented on GitHub (Aug 22, 2025):

on private azure instance, using opencode v0.5.13 I still have:

Image
  "provider": {
    "XXXX": {
      "npm": "@ai-sdk/openai-compatible",     // tested with this or even without
      "name": "YYYY",
      "options": {
        "baseURL": "https://ai.yyyy.com/openai/",
        "apiKey": "{env:OPENAI_API_KEY}"
      },
      "models": {
        "gpt-5": { 
          "name": "gpt-5"
        },
opencode run "hi" --model "XXXX/gpt-5"
Error: AI_APICallError: litellm.BadRequestError: AzureException BadRequestError - Unknown parameter: 'reasoningEffort'. Did you mean 'reasoning_effort'?. Received Model Group=gpt-5
Available Model Group Fallbacks=None

when provider XXXX is replaced with "openai" and npm is commented then it works without problems. After all looks like new users wont have a problem, I went to this as I have had previous 4.1 configuration in place.

@f5epcim commented on GitHub (Aug 22, 2025): on private azure instance, using opencode v0.5.13 I still have: <img width="1297" height="98" alt="Image" src="https://github.com/user-attachments/assets/d9276745-8e69-42e4-a484-796abffd7d68" /> ``` "provider": { "XXXX": { "npm": "@ai-sdk/openai-compatible", // tested with this or even without "name": "YYYY", "options": { "baseURL": "https://ai.yyyy.com/openai/", "apiKey": "{env:OPENAI_API_KEY}" }, "models": { "gpt-5": { "name": "gpt-5" }, ``` ```sh opencode run "hi" --model "XXXX/gpt-5" Error: AI_APICallError: litellm.BadRequestError: AzureException BadRequestError - Unknown parameter: 'reasoningEffort'. Did you mean 'reasoning_effort'?. Received Model Group=gpt-5 Available Model Group Fallbacks=None ``` when provider XXXX is replaced with "openai" and npm is commented then it works without problems. After all looks like new users wont have a problem, I went to this as I have had previous 4.1 configuration in place.
Author
Owner

@epcim commented on GitHub (Aug 22, 2025):

on private azure instance, using opencode v0.5.13 I still have:

Image ``` "provider": { "XXXX": { "npm": "@ai-sdk/openai-compatible", // tested with this or even without "name": "YYYY", "options": { "baseURL": "https://ai.yyyy.com/openai/", "apiKey": "{env:OPENAI_API_KEY}" }, "models": { "gpt-5": { "name": "gpt-5" }, ```

opencode run "hi" --model "XXXX/gpt-5"
Error: AI_APICallError: litellm.BadRequestError: AzureException BadRequestError - Unknown parameter: 'reasoningEffort'. Did you mean 'reasoning_effort'?. Received Model Group=gpt-5
Available Model Group Fallbacks=None

when provider XXXX is replaced with "openai" and npm is commented then it works without problems. After all looks like new users wont have a problem, I went to this as I have had previous 4.1 configuration in place.

But then I really have to call it opencode run "hi" --model "openai/gpt-5" with opencode run "hi" --model "YYYY/gpt-5" it will again fail on

ERROR 2025-08-22T11:23:10 +0ms service=tui message=AI_APICallError: litellm.BadRequestError: AzureException BadRequestError - Unknown parameter: 'reasoningEffort'. Did you mean 'reasoning_effort'?. Received Model Group=gpt-5

Which is a regression of previous error. Related to provider not having in name "openai".

@epcim commented on GitHub (Aug 22, 2025): > on private azure instance, using opencode v0.5.13 I still have: > > <img alt="Image" width="1297" height="98" src="https://private-user-images.githubusercontent.com/224824178/480943601-d9276745-8e69-42e4-a484-796abffd7d68.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTU4ODAzNTAsIm5iZiI6MTc1NTg4MDA1MCwicGF0aCI6Ii8yMjQ4MjQxNzgvNDgwOTQzNjAxLWQ5Mjc2NzQ1LThlNjktNDJlNC1hNDg0LTc5NmFiZmZkN2Q2OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwODIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDgyMlQxNjI3MzBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04YzBkZWRiOTk0MWZhNDNkYzg0NWFjMTEwM2I0NjQ4ODZlMjk4OGMwNmVjY2MxZmRkMWYwYWFlYWNhMDhjZTcwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.CfRkmV2XwD-s6nw15qEd0-yiqcjwnBQD3qIAn2mfirg"> > ``` > "provider": { > "XXXX": { > "npm": "@ai-sdk/openai-compatible", // tested with this or even without > "name": "YYYY", > "options": { > "baseURL": "https://ai.yyyy.com/openai/", > "apiKey": "{env:OPENAI_API_KEY}" > }, > "models": { > "gpt-5": { > "name": "gpt-5" > }, > ``` > > opencode run "hi" --model "XXXX/gpt-5" > Error: AI_APICallError: litellm.BadRequestError: AzureException BadRequestError - Unknown parameter: 'reasoningEffort'. Did you mean 'reasoning_effort'?. Received Model Group=gpt-5 > Available Model Group Fallbacks=None when provider XXXX is replaced with "openai" and npm is commented then it works without problems. After all looks like new users wont have a problem, I went to this as I have had previous 4.1 configuration in place. But then I really have to call it `opencode run "hi" --model "openai/gpt-5"` with ` opencode run "hi" --model "YYYY/gpt-5"` it will again fail on ``` ERROR 2025-08-22T11:23:10 +0ms service=tui message=AI_APICallError: litellm.BadRequestError: AzureException BadRequestError - Unknown parameter: 'reasoningEffort'. Did you mean 'reasoning_effort'?. Received Model Group=gpt-5 ``` Which is a regression of previous error. Related to provider not having in name "openai".
Author
Owner

@ncecere commented on GitHub (Aug 24, 2025):

Doing this also works

  "provider": {
    "CUSTOM_NAME": {
      "npm": "@ai-sdk/openai",     // tested with this or even without
      "name": "YYYY",
      "options": {
        "baseURL": "https://ai.yyyy.com/openai/",
        "apiKey": "{env:OPENAI_API_KEY}"
      },
      "models": {
        "gpt-5": { 
          "name": "gpt-5"
        },

I'm talking to an OpenAI compatible API (LiteLLM) and gpt-5 and gpt-5-mini work with out an issue.

I hope this helps, lets me keep things organized too.

@ncecere commented on GitHub (Aug 24, 2025): Doing this also works ``` "provider": { "CUSTOM_NAME": { "npm": "@ai-sdk/openai", // tested with this or even without "name": "YYYY", "options": { "baseURL": "https://ai.yyyy.com/openai/", "apiKey": "{env:OPENAI_API_KEY}" }, "models": { "gpt-5": { "name": "gpt-5" }, ``` I'm talking to an OpenAI compatible API (LiteLLM) and gpt-5 and gpt-5-mini work with out an issue. I hope this helps, lets me keep things organized too.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1261