@opencode-ai/ai 0.0.0-dev-18237 → 0.0.0-dev-18239
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/cache-policy.js
CHANGED
|
@@ -34,7 +34,7 @@ const resolve = (policy) => {
|
|
|
34
34
|
// Protocols whose wire format ignores inline cache markers (OpenAI's implicit
|
|
35
35
|
// prefix caching, Gemini's implicit + out-of-band CachedContent). Skip the
|
|
36
36
|
// whole policy pass for these — emitting hints would be harmless but pointless.
|
|
37
|
-
const RESPECTS_INLINE_HINTS = new Set(["anthropic-messages", "bedrock-converse", "openrouter"]);
|
|
37
|
+
const RESPECTS_INLINE_HINTS = new Set(["anthropic-messages", "google-vertex-messages", "bedrock-converse", "openrouter"]);
|
|
38
38
|
const makeHint = (ttlSeconds) => ttlSeconds !== undefined ? new CacheHint({ type: "ephemeral", ttlSeconds }) : new CacheHint({ type: "ephemeral" });
|
|
39
39
|
const markLastTool = (tools, hint, budget) => {
|
|
40
40
|
if (tools.length === 0)
|
|
@@ -374,8 +374,7 @@ const lowerToolResultOutput = Effect.fnUntraced(function* (part, request, extens
|
|
|
374
374
|
return yield* Effect.forEach(content, (item) => lowerToolResultContentItem(item, request, extension));
|
|
375
375
|
});
|
|
376
376
|
const lowerMessages = Effect.fn("OpenResponses.lowerMessages")(function* (request, extension) {
|
|
377
|
-
const
|
|
378
|
-
const input = [...system];
|
|
377
|
+
const input = [];
|
|
379
378
|
const providerMetadataKey = request.model.route.providerMetadataKey ?? "openresponses";
|
|
380
379
|
for (const message of request.messages) {
|
|
381
380
|
if (message.role === "system") {
|
|
@@ -496,10 +495,11 @@ const lowerMessages = Effect.fn("OpenResponses.lowerMessages")(function* (reques
|
|
|
496
495
|
});
|
|
497
496
|
const lowerOptions = (request) => {
|
|
498
497
|
const options = OpenResponsesOptions.resolve(request);
|
|
498
|
+
const instructions = ProviderShared.joinText(request.system);
|
|
499
499
|
const cacheKey = ProviderShared.promptCacheKey(request);
|
|
500
500
|
const parallelToolCalls = resolveParallelToolCalls(request);
|
|
501
501
|
return {
|
|
502
|
-
...(
|
|
502
|
+
...(instructions ? { instructions } : {}),
|
|
503
503
|
...(options.store !== undefined ? { store: options.store } : {}),
|
|
504
504
|
...(options.metadata ? { metadata: options.metadata } : {}),
|
|
505
505
|
...(options.safetyIdentifier ? { safety_identifier: options.safetyIdentifier } : {}),
|
|
@@ -26,7 +26,6 @@ export declare const StreamOptions: Schema.Struct<{
|
|
|
26
26
|
readonly includeObfuscation: Schema.optional<Schema.Boolean>;
|
|
27
27
|
}>;
|
|
28
28
|
export declare const Options: Schema.Struct<{
|
|
29
|
-
readonly instructions: Schema.optional<Schema.String>;
|
|
30
29
|
readonly store: Schema.optional<Schema.Boolean>;
|
|
31
30
|
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
32
31
|
readonly safetyIdentifier: Schema.optional<Schema.String>;
|
|
@@ -28,7 +28,6 @@ export const StreamOptions = Schema.Struct({
|
|
|
28
28
|
includeObfuscation: Schema.optional(Schema.Boolean),
|
|
29
29
|
});
|
|
30
30
|
export const Options = Schema.Struct({
|
|
31
|
-
instructions: Schema.optional(Schema.String),
|
|
32
31
|
store: Schema.optional(Schema.Boolean),
|
|
33
32
|
metadata: Schema.optional(Schema.Record(Schema.String, Schema.String)),
|
|
34
33
|
safetyIdentifier: Schema.optional(Schema.String),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-18239",
|
|
4
4
|
"name": "@opencode-ai/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
32
32
|
"@effect/platform-node": "4.0.0-rc.111",
|
|
33
|
-
"@opencode-ai/http-recorder": "0.0.0-dev-
|
|
33
|
+
"@opencode-ai/http-recorder": "0.0.0-dev-18239",
|
|
34
34
|
"@tsconfig/bun": "1.0.9",
|
|
35
35
|
"@types/bun": "1.3.13",
|
|
36
36
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@smithy/eventstream-codec": "4.2.14",
|
|
41
41
|
"@smithy/util-utf8": "4.2.2",
|
|
42
|
-
"@opencode-ai/schema": "0.0.0-dev-
|
|
42
|
+
"@opencode-ai/schema": "0.0.0-dev-18239",
|
|
43
43
|
"aws4fetch": "1.0.20",
|
|
44
44
|
"effect": "4.0.0-rc.111",
|
|
45
45
|
"google-auth-library": "10.5.0"
|