@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @poncho-ai/harness@0.52.0 build /home/runner/work/poncho-ai/poncho-ai/packages/harness
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
  CLI tsup v8.5.1
9
9
  CLI Target: es2022
10
10
  ESM Build start
11
- ESM dist/index.js 536.18 KB
11
+ ESM dist/index.js 536.24 KB
12
12
  ESM dist/isolate-F2PPSUL6.js 53.82 KB
13
- ESM ⚡️ Build success in 234ms
13
+ ESM ⚡️ Build success in 235ms
14
14
  DTS Build start
15
- DTS ⚡️ Build success in 7615ms
16
- DTS dist/index.d.ts 92.18 KB
15
+ DTS ⚡️ Build success in 8126ms
16
+ DTS dist/index.d.ts 92.40 KB
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
- /** Sampling temperature. Default: 0.2. */
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 temperature = opts.temperature ?? DEFAULT_TEMPERATURE;
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 ?? 0.2;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poncho-ai/harness",
3
- "version": "0.52.0",
3
+ "version": "0.52.1",
4
4
  "description": "Agent execution runtime - conversation loop, tool dispatch, streaming",
5
5
  "repository": {
6
6
  "type": "git",
@@ -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
- /** Sampling temperature. Default: 0.2. */
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
- const temperature = opts.temperature ?? DEFAULT_TEMPERATURE;
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
- const temperature = agent.frontmatter.model?.temperature ?? 0.2;
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: {