@poncho-ai/harness 0.52.0 → 0.52.1
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/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +5 -5
- package/package.json +1 -1
- package/src/default-agent.ts +11 -4
- package/src/harness.ts +7 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/harness@0.52.
|
|
2
|
+
> @poncho-ai/harness@0.52.1 build /home/runner/work/poncho-ai/poncho-ai/packages/harness
|
|
3
3
|
> node scripts/embed-docs.js && tsup src/index.ts --format esm --dts
|
|
4
4
|
|
|
5
5
|
[embed-docs] Generated poncho-docs.ts with 4 topics
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
[34mCLI[39m tsup v8.5.1
|
|
9
9
|
[34mCLI[39m Target: es2022
|
|
10
10
|
[34mESM[39m Build start
|
|
11
|
-
[32mESM[39m [1mdist/index.js [22m[32m536.
|
|
11
|
+
[32mESM[39m [1mdist/index.js [22m[32m536.24 KB[39m
|
|
12
12
|
[32mESM[39m [1mdist/isolate-F2PPSUL6.js [22m[32m53.82 KB[39m
|
|
13
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 235ms
|
|
14
14
|
[34mDTS[39m Build start
|
|
15
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m92.
|
|
15
|
+
[32mDTS[39m ⚡️ Build success in 8126ms
|
|
16
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m92.40 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @poncho-ai/harness
|
|
2
2
|
|
|
3
|
+
## 0.52.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0e8fff1`](https://github.com/cesr/poncho-ai/commit/0e8fff12aed9d5efe1821ed3560ead48a16113c1) Thanks [@cesr](https://github.com/cesr)! - Only send `temperature` to the model when the agent explicitly sets one. The harness previously defaulted to `temperature: 0.2` and always passed it to `streamText`, which returns a 400 ("`temperature` is deprecated for this model") on models that removed sampling params (Fable 5, Opus 4.7+). `temperature` is now omitted from the request when undefined — the same treatment `maxTokens` already had — and `defaultAgentDefinition` no longer hard-codes a `temperature` line into the generated frontmatter (pass `temperature` explicitly to set one).
|
|
8
|
+
|
|
3
9
|
## 0.52.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -737,7 +737,12 @@ interface DefaultAgentDefinitionOptions {
|
|
|
737
737
|
modelProvider?: "anthropic" | "openai" | "openai-codex";
|
|
738
738
|
/** Model name. Default: "claude-opus-4-5". */
|
|
739
739
|
modelName?: string;
|
|
740
|
-
/**
|
|
740
|
+
/**
|
|
741
|
+
* Sampling temperature. When unset, it is omitted from the generated
|
|
742
|
+
* frontmatter entirely and the harness sends no temperature (provider
|
|
743
|
+
* default). Newer models (Fable 5, Opus 4.7+) reject `temperature` — leave
|
|
744
|
+
* this unset for them.
|
|
745
|
+
*/
|
|
741
746
|
temperature?: number;
|
|
742
747
|
/** Max tool-call steps per run. Default: 20. */
|
|
743
748
|
maxSteps?: number;
|
package/dist/index.js
CHANGED
|
@@ -588,7 +588,8 @@ var defaultAgentDefinition = (opts = {}) => {
|
|
|
588
588
|
const description = opts.description ?? DEFAULT_AGENT_DESCRIPTION;
|
|
589
589
|
const modelProvider = opts.modelProvider ?? DEFAULT_MODEL_PROVIDER;
|
|
590
590
|
const modelName = opts.modelName ?? DEFAULT_MODEL_NAME;
|
|
591
|
-
const
|
|
591
|
+
const temperatureLine = opts.temperature !== void 0 ? `
|
|
592
|
+
temperature: ${opts.temperature}` : "";
|
|
592
593
|
const maxSteps = opts.maxSteps ?? DEFAULT_MAX_STEPS;
|
|
593
594
|
const timeout = opts.timeout ?? DEFAULT_TIMEOUT;
|
|
594
595
|
return `---
|
|
@@ -597,8 +598,7 @@ id: ${id}
|
|
|
597
598
|
description: ${description}
|
|
598
599
|
model:
|
|
599
600
|
provider: ${modelProvider}
|
|
600
|
-
name: ${modelName}
|
|
601
|
-
temperature: ${temperature}
|
|
601
|
+
name: ${modelName}${temperatureLine}
|
|
602
602
|
limits:
|
|
603
603
|
maxSteps: ${maxSteps}
|
|
604
604
|
timeout: ${timeout}
|
|
@@ -10832,7 +10832,7 @@ ${textContent}` };
|
|
|
10832
10832
|
cachedCoreMessages = [...cachedCoreMessages, ...newCoreMessages];
|
|
10833
10833
|
convertedUpTo = messages.length;
|
|
10834
10834
|
const coreMessages = cachedCoreMessages;
|
|
10835
|
-
const temperature = agent.frontmatter.model?.temperature
|
|
10835
|
+
const temperature = agent.frontmatter.model?.temperature;
|
|
10836
10836
|
const maxTokens = agent.frontmatter.model?.maxTokens;
|
|
10837
10837
|
const cachedMessages = skipTailCache ? coreMessages : addPromptCacheBreakpoints(
|
|
10838
10838
|
coreMessages,
|
|
@@ -10860,7 +10860,7 @@ ${textContent}` };
|
|
|
10860
10860
|
...useStaticCache ? {} : { system: systemPrompt },
|
|
10861
10861
|
messages: messagesForStep,
|
|
10862
10862
|
tools: toolsForStep,
|
|
10863
|
-
temperature,
|
|
10863
|
+
...typeof temperature === "number" ? { temperature } : {},
|
|
10864
10864
|
abortSignal: input.abortSignal,
|
|
10865
10865
|
...typeof maxTokens === "number" ? { maxTokens } : {},
|
|
10866
10866
|
experimental_telemetry: {
|
package/package.json
CHANGED
package/src/default-agent.ts
CHANGED
|
@@ -26,7 +26,12 @@ export interface DefaultAgentDefinitionOptions {
|
|
|
26
26
|
modelProvider?: "anthropic" | "openai" | "openai-codex";
|
|
27
27
|
/** Model name. Default: "claude-opus-4-5". */
|
|
28
28
|
modelName?: string;
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Sampling temperature. When unset, it is omitted from the generated
|
|
31
|
+
* frontmatter entirely and the harness sends no temperature (provider
|
|
32
|
+
* default). Newer models (Fable 5, Opus 4.7+) reject `temperature` — leave
|
|
33
|
+
* this unset for them.
|
|
34
|
+
*/
|
|
30
35
|
temperature?: number;
|
|
31
36
|
/** Max tool-call steps per run. Default: 20. */
|
|
32
37
|
maxSteps?: number;
|
|
@@ -55,7 +60,10 @@ export const defaultAgentDefinition = (
|
|
|
55
60
|
const description = opts.description ?? DEFAULT_AGENT_DESCRIPTION;
|
|
56
61
|
const modelProvider = opts.modelProvider ?? DEFAULT_MODEL_PROVIDER;
|
|
57
62
|
const modelName = opts.modelName ?? DEFAULT_MODEL_NAME;
|
|
58
|
-
|
|
63
|
+
// Opt-in: only emit a `temperature:` line when explicitly provided, so the
|
|
64
|
+
// harness sends no temperature otherwise (newer models reject it).
|
|
65
|
+
const temperatureLine =
|
|
66
|
+
opts.temperature !== undefined ? `\n temperature: ${opts.temperature}` : "";
|
|
59
67
|
const maxSteps = opts.maxSteps ?? DEFAULT_MAX_STEPS;
|
|
60
68
|
const timeout = opts.timeout ?? DEFAULT_TIMEOUT;
|
|
61
69
|
|
|
@@ -65,8 +73,7 @@ id: ${id}
|
|
|
65
73
|
description: ${description}
|
|
66
74
|
model:
|
|
67
75
|
provider: ${modelProvider}
|
|
68
|
-
name: ${modelName}
|
|
69
|
-
temperature: ${temperature}
|
|
76
|
+
name: ${modelName}${temperatureLine}
|
|
70
77
|
limits:
|
|
71
78
|
maxSteps: ${maxSteps}
|
|
72
79
|
timeout: ${timeout}
|
package/src/harness.ts
CHANGED
|
@@ -2907,7 +2907,12 @@ Code is wrapped in an async IIFE — use \`return\` to return a value to the too
|
|
|
2907
2907
|
convertedUpTo = messages.length;
|
|
2908
2908
|
const coreMessages = cachedCoreMessages;
|
|
2909
2909
|
|
|
2910
|
-
|
|
2910
|
+
// Only send temperature when the agent explicitly set one. Newer
|
|
2911
|
+
// models (Fable 5, Opus 4.7+) removed sampling params entirely and
|
|
2912
|
+
// return a 400 ("`temperature` is deprecated for this model") on any
|
|
2913
|
+
// value — forcing a default here broke them. Treated like maxTokens
|
|
2914
|
+
// below: omitted from the request when undefined.
|
|
2915
|
+
const temperature = agent.frontmatter.model?.temperature;
|
|
2911
2916
|
const maxTokens = agent.frontmatter.model?.maxTokens;
|
|
2912
2917
|
// Place the tail breakpoint before any untruncated tool-result so
|
|
2913
2918
|
// we cache only the stable prefix when prior-run tool results are
|
|
@@ -2971,7 +2976,7 @@ Code is wrapped in an async IIFE — use \`return\` to return a value to the too
|
|
|
2971
2976
|
...(useStaticCache ? {} : { system: systemPrompt }),
|
|
2972
2977
|
messages: messagesForStep,
|
|
2973
2978
|
tools: toolsForStep,
|
|
2974
|
-
temperature,
|
|
2979
|
+
...(typeof temperature === "number" ? { temperature } : {}),
|
|
2975
2980
|
abortSignal: input.abortSignal,
|
|
2976
2981
|
...(typeof maxTokens === "number" ? { maxTokens } : {}),
|
|
2977
2982
|
experimental_telemetry: {
|