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

AI assist fails for any openai o1 model #3631

Open
awooler opened this issue Jan 30, 2025 · 3 comments
Open

AI assist fails for any openai o1 model #3631

awooler opened this issue Jan 30, 2025 · 3 comments
Labels
bug Something isn't working upstream

Comments

@awooler
Copy link

awooler commented Jan 30, 2025

Describe the bug

Hello, very happy to see that the openai o1 model family is now available through AI assist. However when I try to use any of the o1 models, I see this error:

openai.BadRequestError: Error code: 400 - {'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'}}

I can confirm that I don't have any custom instructions input to my marimo settings, and I believe o1 models don't support system instruction, so assuming that marimo is trying to pass system instructions by default which triggers the issue.

Environment

{
  "marimo": "0.10.17",
  "OS": "Darwin",
  "OS Version": "24.1.0",
  "Processor": "i386",
  "Python Version": "3.9.0",
  "Binaries": {
    "Browser": "132.0.6834.112",
    "Node": "--"
  },
  "Dependencies": {
    "click": "8.1.7",
    "docutils": "0.17.1",
    "itsdangerous": "2.2.0",
    "jedi": "0.19.2",
    "markdown": "3.7",
    "narwhals": "1.18.4",
    "packaging": "24.2",
    "psutil": "5.9.8",
    "pygments": "2.18.0",
    "pymdown-extensions": "10.12",
    "pyyaml": "6.0.2",
    "ruff": "0.8.3",
    "starlette": "0.27.0",
    "tomlkit": "0.13.2",
    "typing-extensions": "4.12.2",
    "uvicorn": "0.34.0",
    "websockets": "14.1"
  },
  "Optional Dependencies": {
    "altair": "5.5.0",
    "pandas": "2.2.3",
    "pyarrow": "18.1.0"
  },
  "Experimental Flags": {
    "chat_sidebar": true,
    "tracing": false
  }
}

Code to reproduce

No response

@awooler awooler added the bug Something isn't working label Jan 30, 2025
@mscolnick
Copy link
Contributor

hey @awooler, we can likely check if the model starts with o1 and remove ignore the system prompt. would you want to contribute this fix? i don't use the o1 models myself yet.

@awooler
Copy link
Author

awooler commented Feb 3, 2025

hey, I was mistaken that the o1 models don't support a system prompt, that used to be the case but seems like they added a "developer" prompt instead.

Image

however see this thread: https://community.openai.com/t/how-is-developer-message-better-than-system-prompt/1062784

they say that the "developer" message should be forwards/backwards compatible with the "system" message, which others are reporting is not the case for them as well, so probably will stick to sonnet for now until fixed on their side

@mscolnick
Copy link
Contributor

Sounds good, we can wait until openai new models' API becomes more stable

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

No branches or pull requests

2 participants