@poncho-ai/sdk 1.15.1 → 1.15.2
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 +4 -4
- package/CHANGELOG.md +8 -0
- package/dist/index.d.ts +11 -0
- package/package.json +1 -1
- package/src/index.ts +11 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/sdk@1.15.
|
|
2
|
+
> @poncho-ai/sdk@1.15.2 build /home/runner/work/poncho-ai/poncho-ai/packages/sdk
|
|
3
3
|
> tsup src/index.ts --format esm --dts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
[34mCLI[39m Target: es2022
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[32mESM[39m [1mdist/index.js [22m[32m17.24 KB[39m
|
|
11
|
-
[32mESM[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m ⚡️ Build success in 21ms
|
|
12
12
|
[34mDTS[39m Build start
|
|
13
|
-
[32mDTS[39m ⚡️ Build success in
|
|
14
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
13
|
+
[32mDTS[39m ⚡️ Build success in 1365ms
|
|
14
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m32.36 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @poncho-ai/sdk
|
|
2
2
|
|
|
3
|
+
## 1.15.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3a25676`](https://github.com/cesr/poncho-ai/commit/3a2567666e1bc8d6650818db76d07765c0250264) Thanks [@cesr](https://github.com/cesr)! - Add a per-run `model` override to `RunInput` (and forward it from `runConversationTurn`'s opts). The override is captured once at run start and wins over the agent definition's `model.name` for every step of the run.
|
|
8
|
+
|
|
9
|
+
Previously the only way to vary the model per run kind on a shared harness was mutating `parsedAgent.frontmatter.model.name` before each run — but the harness re-reads that field at the start of every step, so a concurrent run's mutation flipped an in-flight run's model mid-turn. Besides being the wrong model, the switch invalidated the run's entire Anthropic prompt cache (caches are per-model), observed in production as the same ~104k-token prefix being cache-written twice back-to-back, once per model. Callers should pass `model` in the run input instead of mutating frontmatter.
|
|
10
|
+
|
|
3
11
|
## 1.15.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -771,6 +771,17 @@ interface RunInput {
|
|
|
771
771
|
* will hit the cache before the 5-min TTL expires.
|
|
772
772
|
*/
|
|
773
773
|
disablePromptCache?: boolean;
|
|
774
|
+
/**
|
|
775
|
+
* Model name override for this run, captured once at run start. Takes
|
|
776
|
+
* precedence over the agent definition's `model.name` for every step of
|
|
777
|
+
* the run. Use this instead of mutating the parsed agent's frontmatter
|
|
778
|
+
* when one harness instance serves runs that need different models
|
|
779
|
+
* (e.g. user turns vs cron jobs) — a frontmatter mutation made while
|
|
780
|
+
* another run is in flight changes that run's model mid-turn, and the
|
|
781
|
+
* model switch invalidates its entire Anthropic prompt cache (caches
|
|
782
|
+
* are per-model).
|
|
783
|
+
*/
|
|
784
|
+
model?: string;
|
|
774
785
|
/** Scope this run to a specific tenant. */
|
|
775
786
|
tenantId?: string;
|
|
776
787
|
/**
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -152,6 +152,17 @@ export interface RunInput {
|
|
|
152
152
|
* will hit the cache before the 5-min TTL expires.
|
|
153
153
|
*/
|
|
154
154
|
disablePromptCache?: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Model name override for this run, captured once at run start. Takes
|
|
157
|
+
* precedence over the agent definition's `model.name` for every step of
|
|
158
|
+
* the run. Use this instead of mutating the parsed agent's frontmatter
|
|
159
|
+
* when one harness instance serves runs that need different models
|
|
160
|
+
* (e.g. user turns vs cron jobs) — a frontmatter mutation made while
|
|
161
|
+
* another run is in flight changes that run's model mid-turn, and the
|
|
162
|
+
* model switch invalidates its entire Anthropic prompt cache (caches
|
|
163
|
+
* are per-model).
|
|
164
|
+
*/
|
|
165
|
+
model?: string;
|
|
155
166
|
/** Scope this run to a specific tenant. */
|
|
156
167
|
tenantId?: string;
|
|
157
168
|
/**
|