Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

o1 issue with system role #186

Open
2 tasks done
agn-7 opened this issue Sep 14, 2024 · 10 comments
Open
2 tasks done

o1 issue with system role #186

agn-7 opened this issue Sep 14, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@agn-7
Copy link

agn-7 commented Sep 14, 2024

Verify it's not a duplicate bug report

Describe the Bug

HTTP 400 Bad Request. You may have exhausted your OpenAI subscription allowance or have an expired account. You can clear your API Key from VS Code's [secrets storage](https://code.visualstudio.com/api/references/vscode-api#SecretStorage) with Genie: Clear API Key command. Check your allowance and account's expiration date here: https://platform.openai.com/account/usage

{
  "error": {
    "message": "Unsupported value: 'messages[0].role' does not support 'system' with this model.",
    "type": "invalid_request_error",
    "param": "messages[0].role",
    "code": "unsupported_value"
  }
}

Please tell us if you have customized any of the extension settings or whether you are using the defaults.

model: o1-preview

Additional context

As the o1 model is in the Beta version, it doesn't support system role and some parameters yet. Here's the SO post regarding this issue.

@agn-7 agn-7 added the bug Something isn't working label Sep 14, 2024
@genieai-info
Copy link
Contributor

@agn-7 Thanks for letting us know. Unfortunately, we don't have tier-5 access to test it out, hence the bug :/

Could you please try again with the new version v0.0.13 and let us know if the issue is fixed? We disabled the stream and systemMessage parameters as documented for the o1* reasoning models.

If you could verify whether it works now, we'd appreciate it 🙏

@agn-7
Copy link
Author

agn-7 commented Sep 16, 2024

still has issue:

HTTP 400 Bad Request. You may have exhausted your OpenAI subscription allowance or have an expired account. You can clear your API Key from VS Code's [secrets storage](https://code.visualstudio.com/api/references/vscode-api#SecretStorage) with Genie: Clear API Key command. Check your allowance and account's expiration date here: https://platform.openai.com/account/usage

OpenAI error 400: {
  "error": {
    "message": "Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead.",
    "type": "invalid_request_error",
    "param": "max_tokens",
    "code": "unsupported_parameter"
  }
}

the temperature and max_tokens parameters don't support either. I mentioned them earlier on the SO post.

@DiamondGlassDrill
Copy link

I do have Tier 5 but see the same issues!

@InfImpDrive
Copy link

InfImpDrive commented Sep 25, 2024

@genieai-info -- o1 is now on Tier 4

I activated Tier 4 by depositing 100 dollars more (I had already spent 150). It only requires 250 lifetime-deposit dollars even if not yet spent, and will instantly activate o1 API once OpenAI has gotten your 250th dollar (whether used-up or as unspent credit) as long as your API account is ~2 weeks old or thereabouts and you paid at least 1 cent 2 weeks ago or more.

You now can even go from Tier 1 directly to Tier 4, if you suddenly deposit 250 dollars, as long as you've deposited a penny a couple weeks ago. It's account age, 2 week since last successful payment, and 250.00th penny you've deposited at OpenAI. Even if you've never made a single API call. So it's now much easier for us to graduate to access o1 API.

I am happy to beta-test. I'm getting this error though:

HTTP 400 Bad Request. You may have exhausted your OpenAI subscription allowance or have an expired account. You can clear your API Key from VS Code's secrets storage with Genie: Clear API Key command. Check your allowance and account's expiration date here: https://platform.openai.com/account/usage

OpenAI error 400: {
  "error": {
    "message": "Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead.",
    "type": "invalid_request_error",
    "param": "max_tokens",
    "code": "unsupported_parameter"
  }
}

Also, o1 can output 64 kilotokens, so that's a lot of code output.

While not perfect, o1 is much more fantastic at multiple-file reasonining, reorganizing, and refactoring (e.g. improved rearchitecturing advice), so please expedite #34

@InfImpDrive
Copy link

Update @genieai-info - o1 is now on Tier 3! That means just 100 deposited over a period of 7 days.

@xmjiao
Copy link

xmjiao commented Oct 13, 2024

still has issue:

HTTP 400 Bad Request. You may have exhausted your OpenAI subscription allowance or have an expired account. You can clear your API Key from VS Code's [secrets storage](https://code.visualstudio.com/api/references/vscode-api#SecretStorage) with Genie: Clear API Key command. Check your allowance and account's expiration date here: https://platform.openai.com/account/usage

OpenAI error 400: {
  "error": {
    "message": "Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead.",
    "type": "invalid_request_error",
    "param": "max_tokens",
    "code": "unsupported_parameter"
  }
}

the temperature and max_tokens parameters don't support either. I mentioned them earlier on the SO post.

I am running into the same issue. The key is to use the parameter max_completion_tokens instead of max_tokens for o1 models in the Genie source code, or even better, to allow empty string in the setting for max_token and skip the parameter if empty. Unfortunately, only the Genie developer can implement it.

@myh-st
Copy link

myh-st commented Oct 15, 2024

Has this issue been resolved yet? azure openai : o1-preview , o1-mini

image

@blackco66
Copy link

max_tokens is deprecated way. Please transition to max_completion_tokens.

@tf-ctrl
Copy link

tf-ctrl commented Dec 21, 2024

any update to this?

@garrylachman
Copy link

garrylachman commented Dec 26, 2024

workaround:
find genei folder in vscode extensions.
edit out/extension.js and find and replace:
remove presence_penalty: 1
change max_tokens to max_completion_tokens

in settings set tempareture to 1

i make it works.
restart vscode after editing js file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants