Skip to content

Expect NotFoundError for an unknown model - #70

Merged
raghubetina merged 1 commit into
mainfrom
expect-not-found-for-unknown-model
Oct 19, 2026
Merged

raghubetina merged 1 commit into
mainfrom
expect-not-found-for-unknown-model

Conversation

@raghubetina

Copy link
Copy Markdown
Contributor

OpenAI now returns a 404 NotFoundError (code: "model_not_found") for an unknown model, not a 400, so examples/07_edge_cases.rb printed a false ✗. The check reads e.body instead of e.message, since openai 0.106 leaves the body out of the message (0.80 includes it). Verified against the live API: Test 1 now prints ✓. Examples aren't part of CI.

OpenAI now answers an unknown model with a 404 (model_not_found)
instead of a 400, so the edge-case example reported a false failure.
It checks the error code in the body rather than the message text,
because newer openai gem versions leave the body out of #message.
@raghubetina
raghubetina merged commit ee9406e into main Oct 19, 2026
2 checks passed
@raghubetina
raghubetina deleted the expect-not-found-for-unknown-model branch October 19, 2026 16:41
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

Successfully merging this pull request may close these issues.

1 participant