@bluecopa/harness 0.1.0-snapshot.15 → 0.1.0-snapshot.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -170,9 +170,6 @@ export interface VercelAgentLoopConfig {
|
|
|
170
170
|
export class VercelAgentLoop implements AgentLoop {
|
|
171
171
|
private readonly model: string;
|
|
172
172
|
private readonly systemPrompt: string;
|
|
173
|
-
/** System prompt as array with Anthropic cache_control for prompt caching. */
|
|
174
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
175
|
-
private readonly cachedSystemPrompt: any;
|
|
176
173
|
private readonly tools: Record<string, AnyTool>;
|
|
177
174
|
private readonly validToolNames: Set<string>;
|
|
178
175
|
|
|
@@ -192,13 +189,6 @@ export class VercelAgentLoop implements AgentLoop {
|
|
|
192
189
|
'When the task is fully complete, respond with a brief text summary (no tool call).',
|
|
193
190
|
].join(' ');
|
|
194
191
|
|
|
195
|
-
// Wrap system prompt with Anthropic cache_control for prompt caching
|
|
196
|
-
this.cachedSystemPrompt = [{
|
|
197
|
-
type: 'text',
|
|
198
|
-
text: this.systemPrompt,
|
|
199
|
-
providerOptions: { anthropic: { cacheControl: { type: 'ephemeral' } } },
|
|
200
|
-
}];
|
|
201
|
-
|
|
202
192
|
if (config.apiKey) {
|
|
203
193
|
process.env.ANTHROPIC_API_KEY = config.apiKey;
|
|
204
194
|
}
|
|
@@ -214,7 +204,7 @@ export class VercelAgentLoop implements AgentLoop {
|
|
|
214
204
|
model: anthropic(this.model),
|
|
215
205
|
tools: this.tools,
|
|
216
206
|
toolChoice: 'auto',
|
|
217
|
-
system: this.
|
|
207
|
+
system: this.systemPrompt,
|
|
218
208
|
messages: toModelMessages(messages),
|
|
219
209
|
stopWhen: stepCountIs(1),
|
|
220
210
|
});
|
|
@@ -263,7 +253,7 @@ export class VercelAgentLoop implements AgentLoop {
|
|
|
263
253
|
model: anthropic(this.model),
|
|
264
254
|
tools: this.tools,
|
|
265
255
|
toolChoice: 'auto',
|
|
266
|
-
system: this.
|
|
256
|
+
system: this.systemPrompt,
|
|
267
257
|
messages: toModelMessages(messages),
|
|
268
258
|
stopWhen: stepCountIs(1),
|
|
269
259
|
});
|