🔃 refactor: Allow streaming for o1 models in OpenAIClient and agent runs (#6509)

This commit is contained in:
Danny Avila 2025-03-24 09:03:46 -04:00 committed by GitHub
parent 1d29c1efa6
commit c4fea9cd79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 0 additions and 12 deletions

View file

@ -1346,14 +1346,6 @@ ${convo}
let streamResolve; let streamResolve;
if ( if (
this.isOmni === true &&
(this.azure || /o1(?!-(?:mini|preview)).*$/.test(modelOptions.model)) &&
!/o3-.*$/.test(this.modelOptions.model) &&
modelOptions.stream
) {
delete modelOptions.stream;
delete modelOptions.stop;
} else if (
(!this.isOmni || /^o1-(mini|preview)/i.test(modelOptions.model)) && (!this.isOmni || /^o1-(mini|preview)/i.test(modelOptions.model)) &&
modelOptions.reasoning_effort != null modelOptions.reasoning_effort != null
) { ) {

View file

@ -51,10 +51,6 @@ async function createRun({
) { ) {
reasoningKey = 'reasoning'; reasoningKey = 'reasoning';
} }
if (/o1(?!-(?:mini|preview)).*$/.test(llmConfig.model)) {
llmConfig.streaming = false;
llmConfig.disableStreaming = true;
}
/** @type {StandardGraphConfig} */ /** @type {StandardGraphConfig} */
const graphConfig = { const graphConfig = {