@cortexkit/pi-anthropic-auth 2.7.3 → 2.8.0
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/dist/convert.js +1 -1
- package/dist/index.js +1 -1
- package/dist/stream.js +2 -2
- package/package.json +2 -2
package/dist/convert.js
CHANGED
|
@@ -646,7 +646,7 @@ export async function buildAnthropicRequest(modelId, context, options, cache, fa
|
|
|
646
646
|
});
|
|
647
647
|
if (breakpoints > 4)
|
|
648
648
|
throw new Error(`Anthropic accepts at most 4 cache breakpoints; the onPayload hook left ${breakpoints}`);
|
|
649
|
-
const unsigned = JSON.stringify(orderClaudeCodeBody(body));
|
|
649
|
+
const unsigned = JSON.stringify(orderClaudeCodeBody(body, { isOAuth: !!identity }));
|
|
650
650
|
const bodyText = controls.deferSigning
|
|
651
651
|
? unsigned
|
|
652
652
|
: await signRequestBody(unsigned);
|
package/dist/index.js
CHANGED
|
@@ -88,7 +88,7 @@ export default async function cortexKitPiAnthropicAuth(pi, options = {}) {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
// This hook collects effort history for the per-message effort markers
|
|
91
|
-
// that core adds to Fable 5.1, Opus 5.5 and Sonnet 5.5 requests. A host
|
|
91
|
+
// that core adds to Fable 5.1/5.2, Opus 5.5 and Sonnet 5.5 requests. A host
|
|
92
92
|
// whose session entries do not match what this reads must cost the
|
|
93
93
|
// session its transitions and nothing else: the handler runs before every
|
|
94
94
|
// turn, and an exception here surfaced as a per-turn extension error while
|
package/dist/stream.js
CHANGED
|
@@ -183,7 +183,7 @@ function getPiCacheKeepRegistry() {
|
|
|
183
183
|
* betas this body needs. Model requests and CacheKeep prewarms both call it:
|
|
184
184
|
* a prewarm replays a model request's body, and Anthropic needs the same
|
|
185
185
|
* betas to accept it (for example, the effort beta for the empty
|
|
186
|
-
* `role: "system"` effort markers in a Fable 5.1 body). `leadingBetas` appends
|
|
186
|
+
* `role: "system"` effort markers in a Fable 5.1/5.2 body). `leadingBetas` appends
|
|
187
187
|
* adapter-requested feature betas without changing Core's model-beta selection.
|
|
188
188
|
*/
|
|
189
189
|
function applyPiOAuthRequestHeaders(headers, accessToken, options) {
|
|
@@ -432,7 +432,7 @@ function buildPiPrimeBody(identity) {
|
|
|
432
432
|
applyClaudeCodeMetadata(body, identity);
|
|
433
433
|
return {
|
|
434
434
|
body,
|
|
435
|
-
bodyText: JSON.stringify(orderClaudeCodeBody(body)),
|
|
435
|
+
bodyText: JSON.stringify(orderClaudeCodeBody(body, { isOAuth: true })),
|
|
436
436
|
toolNames: new Map(),
|
|
437
437
|
cacheTtlMs: 0,
|
|
438
438
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/pi-anthropic-auth",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"prepublishOnly": "bun run build"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@cortexkit/anthropic-auth-core": "2.
|
|
39
|
+
"@cortexkit/anthropic-auth-core": "2.8.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@earendil-works/pi-ai": ">=0.86.1 <2",
|