Skip to content

[Bug] 400 Invalid schema for response_format #339

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

Closed
SkyYap opened this issue Jan 29, 2025 · 12 comments
Closed

[Bug] 400 Invalid schema for response_format #339

SkyYap opened this issue Jan 29, 2025 · 12 comments
Assignees

Comments

@SkyYap
Copy link

SkyYap commented Jan 29, 2025

Have gone through the connectivity-test by implementing .env file on my folder. Still face this issue.

  • Where are you using Midscene.js (Chrome extension, yaml with cli, Puppeteer,…)
    I am using Midscene.js with yaml with cli. I run C:\Users\(username)\Documents\GitHub\midscene-example\yaml-scripts-demo> midscene .\midscene-scripts\search-headphone-on-ebay.yaml --headed

Run npm run test on yaml-scripts-demo and all these 3 failed (sauce-demo.yaml, search-headphone-on-ebay.yaml and local-static-server.yml) but the extract-github-status.yaml work successfully and produce an output in json correctly.

  • The version of Midscene.js or Extension
    Midscene chrome extension Version 0.26,
    @midscene/cli": "latest"

  • The error message
    400 Invalid schema for response_format 'action_items': In context=('properties', 'actions', 'items', 'properties', 'param', 'type', '0'), 'additionalProperties' is required to be supplied and to be false. Error: 400 Invalid schema for response_format 'action_items': In context=('properties', 'actions', 'items', 'properties', 'param', 'type', '0'), 'additionalProperties' is required to be supplied and to be false.

  • The model name and endpoint (if could be public)
    Using openai model.
    OPENAI_API_KEY="sk-project"

@zhoushaw zhoushaw self-assigned this Jan 29, 2025
@DavidQL
Copy link

DavidQL commented Jan 29, 2025

I am also getting this error as of last night when running mid.aiAction calls on @midscene/[email protected].

@DavidQL
Copy link

DavidQL commented Jan 29, 2025

ai-unit-test.yml fails in my fork with this same OpenAI error message.

@rublev
Copy link

rublev commented Jan 29, 2025

same

@zhoushaw
Copy link
Member

I'm unsure whether I fixed the issue in the new version, as I haven't encountered it myself. Could you please test it out?
https://github.com/web-infra-dev/midscene/releases/tag/v0.10.4 @DavidQL @rublev @SkyYap

@lmatello
Copy link

I still have the same problem.
Im using the demo project.

`> [email protected] e2e

playwright test --config=playwright.config.ts --headed

Running 4 tests using 4 workers
[chromium] › ebay-search-en.spec.ts:10:5 › search headphone on ebay

  1. [chromium] › ebay-search-en.spec.ts:10:5 › search headphone on ebay ───────────────────────────
Error: 400 Invalid schema for response_format 'action_items': In context=('properties', 'actions', 'items', 'properties', 'param', 'type', '0'), 'additionalProperties' is required to be supplied and to be false.
Error: 400 Invalid schema for response_format 'action_items': In context=('properties', 'actions', 'items', 'properties', 'param', 'type', '0'), 'additionalProperties' is required to be supplied and to be false.

    at Function.generate (/Users/lmatello/Downloads/midscene-example-main/playwright-demo/node_modules/openai/src/error.ts:72:14)
    at OpenAI.makeStatusError (/Users/lmatello/Downloads/midscene-example-main/playwright-demo/node_modules/openai/src/core.ts:435:21)
    at OpenAI.makeRequest (/Users/lmatello/Downloads/midscene-example-main/playwright-demo/node_modules/openai/src/core.ts:499:24)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)`

My package-lock:

"devDependencies": { "@midscene/web": "latest", "@playwright/test": "1.48.0", "@types/jest": "~29.5.14", "@types/node": "~22.7.9", "dotenv": "16.4.5", "eslint-plugin-prettier": "~5.2.1", "rimraf": "~6.0.1", "typescript": "~5.6.3" }

@zhoushaw
Copy link
Member

@lmatello Could you send the report from your execution directory? I haven't been able to replicate the issue on my end, and I need to review what the AI actually returned. The report won't include your token information.

Image

@zhoushaw
Copy link
Member

zhoushaw commented Jan 30, 2025

I suspect the issue might be due to an anomaly in the model's data. You could manually set the model's version to gpt-4o-2024-11-20.
Image

@DavidQL
Copy link

DavidQL commented Jan 30, 2025

Still failing for me with same error message on @midscene/[email protected]. Here is the JSON from my midscene_run/report/web-2025-01-30_09-55-38-143.html.

@lmatello
Copy link

Sure @zhoushaw
I send you the report!

playwright-merged-2025-01-30_08-28-04-835.html.zip

@lmatello
Copy link

@zhoushaw Same issue with this:
MIDSCENE_MODEL_NAME='gpt-4o-2024-11-20'

@zhoushaw
Copy link
Member

@lmatello
Copy link

@zhoushaw Now its working!
Thanks so much! 💪

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

No branches or pull requests

5 participants