Repository navigation
fix: BookDate's OpenAI model list shows current GPT models - #530
Merged
Merged
Conversation
The OpenAI model list kept only gpt- ids containing a "4", so GPT-5 models without one were hidden, while gpt-3.5-turbo-instruct-0914 and audio, realtime and search variants were offered. It now keeps gpt-N ids with N >= 4 and drops ids with a dash-separated audio, realtime, transcribe, tts, search, codex or pro part, which BookDate's Chat Completions call can't use. Entries without a string id are skipped instead of failing the test with a 500. Based on #515 by @DG-za. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: DG-za <35300630+DG-za@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BookDate's OpenAI model list now shows current GPT models such as
gpt-5,gpt-5-miniandgpt-5.1. Before, the list kept onlygpt-ids containing a4anywhere, so every GPT-5 model without a4was hidden, whilegpt-3.5-turbo-instruct-0914(a completions-only model, the cause of #118) and audio, realtime and search variants were offered. The list now keepsgpt-Nids with N of 4 or more and drops the families BookDate's Chat Completions call can't use.Changes
src/app/api/bookdate/test-connection/route.tsisBookDateOpenAIModel(id): a string id matchinggpt-N...with N >= 4 (gpt-10-xincluded), excluding any id with a dash-separatedaudio,realtime,transcribe,tts,search,codexorpropart. Codex and Pro models are Responses API only.documentation/features/bookdate.md: the OpenAI model list rule.Tests
tests/api/bookdate-test-connection.routes.test.ts: the two OpenAI cases become one table over the setup wizard (no sign-in) and an admin, with a realistic list of 30 ids (kept GPT-4.x, 4o, 5.x and future majors; dropped 3.5,gpt-3.5-turbo-instruct-0914, audio, realtime, transcribe, TTS, search, Codex, Pro, image,chatgpt-4o-latest,o4-mini, embeddings, Whisper), asserting the exact sorted output and that the OpenAI models endpoint was called. A new case covers entries without a string id.main(9d13539srcwith this branch's tests): 3 tests (both table rows, which also showgpt-5,gpt-5-miniandgpt-5.1missing andgpt-3.5-turbo-instruct-0914listed, and the non-string id case, which returns 500).Checks
vitest relatedonroute.tsplus the test file: PASS, 3 files, 88 teststsc --noEmit: cleanno-explicit-anywarnings: route 10 before and after, test file 58 before, 55 after)Risk and rollback
gpt-4,gpt-4-turboandgpt-4o-2024-05-13ids stay listed, as onmain. They don't accept thejson_schemaresponse format BookDate sends.Based on #515 by @DG-za.
Release note
🤖 Generated with Claude Code