Skip to content

Conversation

@toubatbrian
Copy link
Contributor

@toubatbrian toubatbrian commented Nov 7, 2025

Bump openai to 6.x, Re-enable critical LLM tests to make sure nothing breaks

@changeset-bot
Copy link

changeset-bot bot commented Nov 7, 2025

🦋 Changeset detected

Latest commit: 3d1c719

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugins-test Patch
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-cartesia Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-silero Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@toubatbrian toubatbrian changed the title brianyin/ajs-320-bump-openai-to-6x brianyin/ajs-320-bump-openai-to-6.x Nov 7, 2025
Comment on lines +22 to +32
export type Expand<T> = T extends Function
? T
: T extends object
? T extends Array<infer U>
? Array<Expand<U>>
: T extends Map<infer K, infer V>
? Map<Expand<K>, Expand<V>>
: T extends Set<infer M>
? Set<Expand<M>>
: { [K in keyof T]: Expand<T[K]> }
: T;
Copy link
Contributor Author

@toubatbrian toubatbrian Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example:

type WebSearchOptions = Expand<OpenAI.Chat.Completions.ChatCompletionCreateParams.WebSearchOptions>;

When hover over WebSearchOptions in Cursor, it shows:

type WebSearchOptions = {
    search_context_size?: "low" | "medium" | "high" | undefined;
    user_location?: {
        approximate: {
            city?: string | undefined;
            country?: string | undefined;
            region?: string | undefined;
            timezone?: string | undefined;
        };
        type: "approximate";
    } | null | undefined;
}

instead of

type WebSearchOptions = OpenAI.Chat.Completions.ChatCompletionCreateParams.WebSearchOptions

This helps debug

Comment on lines 131 to 132
expect(calls.length).toStrictEqual(1);
expect(JSON.parse(calls[0]!.args).name).toStrictEqual('Theo');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

google is still outputting NULL for .optional() schema, will add a ticket and investigate it.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this issue with .optional() and OpenAI as well openai/openai-node#1180, looks like a known limitation from the official docs: https://platform.openai.com/docs/guides/structured-outputs#all-fields-must-be-required

@toubatbrian toubatbrian mentioned this pull request Nov 7, 2025
7 tasks
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.

3 participants