-
-
Notifications
You must be signed in to change notification settings - Fork 7
Update OpenAI model from gpt-4o to gpt-6-astra #793
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
Open
ngoiyaeric
wants to merge
1
commit into
main
Choose a base branch
from
ngoiyaeric-patch-6
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: QueueLab/QCX
Length of output: 454
🤖 get_repo_knowledge executed:
get_repo_knowledge QueueLab/QCX /tmp/coderabbit-repo-knowledge/queuelab-qcx-5529762c/architectureLength of output: 44795
🏁 Script executed:
Repository: QueueLab/QCX
Length of output: 14064
🌐 Web query:
site:ai-sdk.dev@ai-sdk/openaiv1.3.24 responses streamObject temperature💡 Result:
In the Vercel AI SDK, including version 1.3.24 (and subsequent versions), the
streamObjectfunction supports thetemperatureparameter as a configuration option for the model [1][2][3]. When using@ai-sdk/openai, this parameter is passed through to the OpenAI provider [3]. Thetemperaturevalue should be a number between 0 and 1, where higher values (e.g., 0.8) increase randomness and lower values (e.g., 0.2) make the output more deterministic [4]. You can define this within yourstreamObjectcall as follows: import { streamObject } from 'ai'; import { openai } from '@ai-sdk/openai'; import { z } from 'zod'; const { partialObjectStream } = streamObject({ model: openai('gpt-4o'), temperature: 0.7, // Set your desired temperature here schema: z.object({ // your schema definition }), prompt: 'Your prompt here', }); Thetemperaturesetting is part of the common model parameters exposed by the AI SDK's core functions [1][2][3]. Note that whilestreamObjectis a dedicated function for structured data, the SDK also supports structured output via theoutputparameter instreamTextin newer versions [5][6].Citations:
🌐 Web query:
site:developers.openai.com/api/docs/guides/latest-model GPT-6 Astra temperature Responses API💡 Result:
To use GPT-6 Astra, you must set the model parameter to gpt-6-astra within your Responses API request [1]. The Responses API is the designated interface for interacting with GPT-6 Astra [1]. While the provided documentation confirms the model supports existing API capabilities such as structured outputs, streaming, and tool calling, specific technical details regarding the temperature parameter for the Responses API are not explicitly detailed in the available summary [1]. In OpenAI's standard API architecture, the temperature parameter typically governs the randomness of the model's output, but you should verify its availability and range specifically within the Responses API implementation through your developer console or the official migration guides linked in your documentation [1]. GPT-6 Astra is capable of mid-turn steering, allowing you to send additional instructions or corrections while the model is actively processing [1]. Note that it does not support the none reasoning effort, and fast mode is unavailable when using EU data residency [1].
Citations:
🏁 Script executed:
Repository: QueueLab/QCX
Length of output: 13804
🌐 Web query:
site:ai-sdk.dev/docs@ai-sdk/openairesponses API streamObject temperature💡 Result:
In the Vercel AI SDK, the
streamObjectfunction has been deprecated in favor of usingstreamTextwith theoutputproperty [1][2]. For both legacystreamObjectand the currentstreamTextfunction, thetemperatureparameter is supported as a standard request setting [3][4]. It is passed through to the model provider (such as OpenAI) to control the randomness of the output [4]. Key implementation details include: - Usage: You can includetemperatureas a top-level property in the configuration object passed tostreamText[3][4]. - Recommendations: It is generally recommended to settemperatureortopP, but not both [3][4]. For structured data generation (which replaces the deprecatedstreamObjectworkflow), atemperatureof0is often recommended to ensure deterministic, consistent results that adhere to your specified schema [5]. - Migration: If you are currently usingstreamObject, you should migrate tostreamTextusingoutput: Output.object({ schema: ... })[6][2]. Thetemperaturesetting remains available in this new pattern [3][7].Citations:
🏁 Script executed:
Repository: QueueLab/QCX
Length of output: 5980
🌐 Web query:
@ai-sdk/openai 1.3.24 createOpenAI responses API model factory💡 Result:
In the
@ai-sdk/openaipackage (including version 1.3.24), createOpenAI is used to instantiate a customized OpenAI provider [1][2]. The returned provider instance acts as a model factory, allowing you to create language models by invoking the provider function or using specific factory methods [1][3]. Key details regarding the Responses API and model factory usage include: Default API Selection: When you invoke the provider instance directly (e.g., openai('model-id')), it automatically selects the appropriate API based on the model ID [1][4]. As of AI SDK 5, the OpenAI Responses API is the default API used by the provider [1][5]. Model Factory Methods: You can explicitly choose the desired API by using the following factory methods on the provider instance [1][4]:.responses(modelId): Explicitly uses the OpenAI Responses API [1][3]..chat(modelId): Uses the OpenAI Chat Completions API [1][3]. This is recommended if your base URL or proxy environment only supports Chat Completions rather than the Responses API [1][6]..completion(modelId): Uses the OpenAI Completions API [7][3]. Customization: If your infrastructure requires a custom base URL that does not support the Responses API, you should use the.chat method or the dedicated OpenAI-compatible provider [1][6][4]. The createOpenAI factory accepts an optional configuration object to set headers, custom base URLs, and other provider-wide settings [1][3][8].Citations:
🏁 Script executed:
Repository: QueueLab/QCX
Length of output: 2436
🌐 Web query:
site:github.com/vercel/ai "@ai-sdk/openai@1.3.24" "responses(modelId)" "chat(modelId)"💡 Result:
In the
@ai-sdk/openaipackage (v1.3.24), the OpenAI provider instance (exported as openai) allows you to create specific language model instances using factory methods [1][2][3]. The chat and responses methods are used as follows: openai.chat(modelId) This method creates an OpenAI model configured for the Chat Completions API [2][4][3]. It is the recommended approach if your use case requires standard chat functionality or if you are using a custom base URL that specifically supports the Chat Completions API [1][2]. openai.responses(modelId) This method creates an OpenAI model configured for the OpenAI Responses API [2][4][3]. Note on Defaults: Since AI SDK 5, the OpenAI provider defaults to the Responses API when using the primary factory method (e.g., openai('gpt-4o')) [1][5]. If you need to explicitly select the Chat Completions API, you must use openai.chat('modelId') [1][5]. Example usage: import { openai } from '@ai-sdk/openai'; // Uses the default (Responses API as of AI SDK 5) const modelDefault = openai('gpt-4o'); // Explicitly uses the Chat Completions API const modelChat = openai.chat('gpt-4o'); // Explicitly uses the Responses API const modelResponses = openai.responses('gpt-4o');Citations:
Use the Responses model for GPT-6 Astra.
getModel()returnsopenai('gpt-6-astra')from both default branches. The pinned AI SDK usesopenai.responses(modelId)for the Responses API. Returnopenai.responses('gpt-6-astra')from both branches because GPT-6 Astra requires the Responses API.Suggested direction
📝 Committable suggestion
🤖 Prompt for AI Agents