mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 20:01:24 +00:00
add option to skip provider tool call validation
This commit is contained in:
parent
2e3ff4a15a
commit
0196308266
12 changed files with 38 additions and 4 deletions
|
|
@ -221,6 +221,7 @@ export class Agent {
|
|||
tools: this._state.tools,
|
||||
model,
|
||||
reasoning,
|
||||
validateToolCallsAtProvider: false,
|
||||
getQueuedMessages: async <T>() => {
|
||||
// Return queued messages based on queue mode
|
||||
if (this.queueMode === "one-at-a-time") {
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ function streamSimpleProxy(
|
|||
temperature: options.temperature,
|
||||
maxTokens: options.maxTokens,
|
||||
reasoning: options.reasoning,
|
||||
validateToolCallsAtProvider: options.validateToolCallsAtProvider,
|
||||
// Don't send apiKey or signal - those are added server-side
|
||||
},
|
||||
}),
|
||||
|
|
@ -365,6 +366,7 @@ export class AppTransport implements AgentTransport {
|
|||
model: cfg.model,
|
||||
reasoning: cfg.reasoning,
|
||||
getQueuedMessages: cfg.getQueuedMessages,
|
||||
validateToolCallsAtProvider: cfg.validateToolCallsAtProvider ?? false,
|
||||
};
|
||||
|
||||
// Yield events from the upstream agentLoop iterator
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ export class ProviderTransport implements AgentTransport {
|
|||
reasoning: cfg.reasoning,
|
||||
apiKey,
|
||||
getQueuedMessages: cfg.getQueuedMessages,
|
||||
validateToolCallsAtProvider: cfg.validateToolCallsAtProvider ?? false,
|
||||
};
|
||||
|
||||
// Yield events from agentLoop
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ export interface AgentRunConfig {
|
|||
model: Model<any>;
|
||||
reasoning?: "low" | "medium" | "high";
|
||||
getQueuedMessages?: <T>() => Promise<QueuedMessage<T>[]>;
|
||||
validateToolCallsAtProvider?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue