Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/core/lib/v3/external_clients/aisdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export class AISdkClient extends LLMClient {
model: this.model,
messages: formattedMessages,
schema: options.response_model.schema,
allowSystemInMessages: true,
});

return {
Expand Down Expand Up @@ -113,6 +114,7 @@ export class AISdkClient extends LLMClient {
model: this.model,
messages: formattedMessages,
tools,
allowSystemInMessages: true,
});

return {
Expand Down
3 changes: 2 additions & 1 deletion packages/core/lib/v3/handlers/v3AgentHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ export class V3AgentHandler {
tools: allTools,
stopWhen: (result) => this.handleStop(result, maxSteps),
toolChoice: "auto",

allowSystemInMessages: true,
prepareStep: this.createPrepareStep(
callbacks?.prepareStep,
captchaSolver,
Expand Down Expand Up @@ -511,6 +511,7 @@ export class V3AgentHandler {
tools: allTools,
stopWhen: (result) => this.handleStop(result, maxSteps),
toolChoice: "auto",
allowSystemInMessages: true,
prepareStep: this.createPrepareStep(
callbacks?.prepareStep,
captchaSolver,
Expand Down
2 changes: 2 additions & 0 deletions packages/core/lib/v3/llm/aisdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ You must respond in JSON format. respond WITH JSON. Do not include any other tex
messages: formattedMessages,
schema: options.response_model.schema,
temperature,
allowSystemInMessages: true,
...(Object.keys(providerOptions).length > 0
? { providerOptions }
: {}),
Expand Down Expand Up @@ -379,6 +380,7 @@ You must respond in JSON format. respond WITH JSON. Do not include any other tex
: "auto"
: undefined,
temperature,
allowSystemInMessages: true,
});
} catch (err) {
// Log error response to maintain request/response pairing
Expand Down
2 changes: 2 additions & 0 deletions packages/evals/lib/AISdkClientWrapped.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ You must respond in JSON format. respond WITH JSON. Do not include any other tex
messages: formattedMessages,
schema: options.response_model.schema,
temperature,
allowSystemInMessages: true,
providerOptions: resolvedReasoningEffort
? {
openai: {
Expand Down Expand Up @@ -289,6 +290,7 @@ You must respond in JSON format. respond WITH JSON. Do not include any other tex
: "auto"
: undefined,
temperature,
allowSystemInMessages: true,
});

// Transform AI SDK response to match LLMResponse format expected by operator handler.
Expand Down
Loading