🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@opencode-ai/ai

Package Overview
Dependencies
Maintainers
2
Versions
376
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencode-ai/ai - npm Package Compare versions

Comparing version
0.0.0-next-16599
to
0.0.0-next-16600
+4
-4
dist/protocols/anthropic-messages.d.ts

@@ -369,3 +369,2 @@ import { Schema } from "effect";

readonly temperature?: number | undefined;
readonly stop_sequences?: readonly string[] | undefined;
readonly thinking?: {

@@ -386,4 +385,5 @@ readonly type: "enabled";

} | undefined;
readonly top_p?: number | undefined;
readonly top_k?: number | undefined;
readonly top_p?: number | undefined;
readonly stop_sequences?: readonly string[] | undefined;
readonly output_config?: {

@@ -613,3 +613,2 @@ readonly effort?: string | undefined;

readonly temperature?: number | undefined;
readonly stop_sequences?: readonly string[] | undefined;
readonly thinking?: {

@@ -630,4 +629,5 @@ readonly type: "enabled";

} | undefined;
readonly top_p?: number | undefined;
readonly top_k?: number | undefined;
readonly top_p?: number | undefined;
readonly stop_sequences?: readonly string[] | undefined;
readonly output_config?: {

@@ -634,0 +634,0 @@ readonly effort?: string | undefined;

@@ -142,2 +142,19 @@ import { Schema } from "effect";

}[] | undefined;
readonly toolConfig?: {
readonly functionCallingConfig: {
readonly mode: "AUTO" | "NONE" | "ANY";
readonly allowedFunctionNames?: readonly string[] | undefined;
};
} | undefined;
readonly cachedContent?: string | undefined;
readonly safetySettings?: readonly {
readonly category: string;
readonly threshold: string;
}[] | undefined;
readonly serviceTier?: string | undefined;
readonly systemInstruction?: {
readonly parts: readonly {
readonly text: string;
}[];
} | undefined;
readonly generationConfig?: {

@@ -155,19 +172,2 @@ readonly temperature?: number | undefined;

} | undefined;
readonly systemInstruction?: {
readonly parts: readonly {
readonly text: string;
}[];
} | undefined;
readonly toolConfig?: {
readonly functionCallingConfig: {
readonly mode: "AUTO" | "NONE" | "ANY";
readonly allowedFunctionNames?: readonly string[] | undefined;
};
} | undefined;
readonly cachedContent?: string | undefined;
readonly safetySettings?: readonly {
readonly category: string;
readonly threshold: string;
}[] | undefined;
readonly serviceTier?: string | undefined;
}, string, {

@@ -263,2 +263,19 @@ readonly candidates?: readonly {

}[] | undefined;
readonly toolConfig?: {
readonly functionCallingConfig: {
readonly mode: "AUTO" | "NONE" | "ANY";
readonly allowedFunctionNames?: readonly string[] | undefined;
};
} | undefined;
readonly cachedContent?: string | undefined;
readonly safetySettings?: readonly {
readonly category: string;
readonly threshold: string;
}[] | undefined;
readonly serviceTier?: string | undefined;
readonly systemInstruction?: {
readonly parts: readonly {
readonly text: string;
}[];
} | undefined;
readonly generationConfig?: {

@@ -276,20 +293,3 @@ readonly temperature?: number | undefined;

} | undefined;
readonly systemInstruction?: {
readonly parts: readonly {
readonly text: string;
}[];
} | undefined;
readonly toolConfig?: {
readonly functionCallingConfig: {
readonly mode: "AUTO" | "NONE" | "ANY";
readonly allowedFunctionNames?: readonly string[] | undefined;
};
} | undefined;
readonly cachedContent?: string | undefined;
readonly safetySettings?: readonly {
readonly category: string;
readonly threshold: string;
}[] | undefined;
readonly serviceTier?: string | undefined;
}, import("../route/transport/http").HttpPrepared<string>>;
export * as Gemini from "./gemini";

@@ -66,2 +66,3 @@ import { Schema } from "effect";

reasoning_effort: Schema.optional<Schema.String>;
max_completion_tokens: Schema.optional<Schema.Number>;
max_tokens: Schema.optional<Schema.Number>;

@@ -131,2 +132,3 @@ temperature: Schema.optional<Schema.Number>;

reasoning_effort: Schema.optional<Schema.String>;
max_completion_tokens: Schema.optional<Schema.Number>;
max_tokens: Schema.optional<Schema.Number>;

@@ -253,8 +255,4 @@ temperature: Schema.optional<Schema.Number>;

readonly seed?: number | undefined;
readonly frequency_penalty?: number | undefined;
readonly max_completion_tokens?: number | undefined;
readonly max_tokens?: number | undefined;
readonly presence_penalty?: number | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly tool_choice?: "required" | "none" | "auto" | {

@@ -268,3 +266,8 @@ readonly type: "function";

readonly store?: boolean | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly reasoning_effort?: string | undefined;
readonly frequency_penalty?: number | undefined;
readonly presence_penalty?: number | undefined;
}, string, {

@@ -359,8 +362,4 @@ readonly error?: {

readonly seed?: number | undefined;
readonly frequency_penalty?: number | undefined;
readonly max_completion_tokens?: number | undefined;
readonly max_tokens?: number | undefined;
readonly presence_penalty?: number | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly tool_choice?: "required" | "none" | "auto" | {

@@ -374,3 +373,8 @@ readonly type: "function";

readonly store?: boolean | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly reasoning_effort?: string | undefined;
readonly frequency_penalty?: number | undefined;
readonly presence_penalty?: number | undefined;
}, string>;

@@ -428,8 +432,4 @@ export declare const route: Route<{

readonly seed?: number | undefined;
readonly frequency_penalty?: number | undefined;
readonly max_completion_tokens?: number | undefined;
readonly max_tokens?: number | undefined;
readonly presence_penalty?: number | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly tool_choice?: "required" | "none" | "auto" | {

@@ -443,4 +443,9 @@ readonly type: "function";

readonly store?: boolean | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly reasoning_effort?: string | undefined;
readonly frequency_penalty?: number | undefined;
readonly presence_penalty?: number | undefined;
}, HttpTransport.HttpPrepared<string>>;
export * as OpenAIChat from "./openai-chat";

@@ -83,2 +83,3 @@ import { Effect, Schema } from "effect";

reasoning_effort: Schema.optional(OpenAIOptions.OpenAIReasoningEffort),
max_completion_tokens: Schema.optional(Schema.Number),
max_tokens: Schema.optional(Schema.Number),

@@ -340,2 +341,3 @@ temperature: Schema.optional(Schema.Number),

const toolSchemaCompatibility = request.model.compatibility?.toolSchema;
const maxTokensField = request.model.compatibility?.maxTokensField ?? "max_tokens";
return {

@@ -350,3 +352,5 @@ model: request.model.id,

stream_options: { include_usage: true },
max_tokens: generation?.maxTokens,
...(maxTokensField === "max_completion_tokens"
? { max_completion_tokens: generation?.maxTokens }
: { max_tokens: generation?.maxTokens }),
temperature: generation?.temperature,

@@ -353,0 +357,0 @@ top_p: generation?.topP,

@@ -61,8 +61,4 @@ import { Route, type RouteRoutedModelInput } from "../route/client";

readonly seed?: number | undefined;
readonly frequency_penalty?: number | undefined;
readonly max_completion_tokens?: number | undefined;
readonly max_tokens?: number | undefined;
readonly presence_penalty?: number | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly tool_choice?: "required" | "none" | "auto" | {

@@ -76,4 +72,9 @@ readonly type: "function";

readonly store?: boolean | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly reasoning_effort?: string | undefined;
readonly frequency_penalty?: number | undefined;
readonly presence_penalty?: number | undefined;
}, import("../route/transport/http").HttpPrepared<string>>;
export * as OpenAICompatibleChat from "./openai-compatible-chat";

@@ -182,3 +182,2 @@ import type { ProviderPackage } from "../provider-package";

readonly temperature?: number | undefined;
readonly stop_sequences?: readonly string[] | undefined;
readonly thinking?: {

@@ -199,4 +198,5 @@ readonly type: "enabled";

} | undefined;
readonly top_p?: number | undefined;
readonly top_k?: number | undefined;
readonly top_p?: number | undefined;
readonly stop_sequences?: readonly string[] | undefined;
readonly output_config?: {

@@ -203,0 +203,0 @@ readonly effort?: string | undefined;

@@ -166,3 +166,2 @@ import type { RouteDefaultsInput } from "../route/client";

readonly temperature?: number | undefined;
readonly stop_sequences?: readonly string[] | undefined;
readonly thinking?: {

@@ -183,4 +182,5 @@ readonly type: "enabled";

} | undefined;
readonly top_p?: number | undefined;
readonly top_k?: number | undefined;
readonly top_p?: number | undefined;
readonly stop_sequences?: readonly string[] | undefined;
readonly output_config?: {

@@ -187,0 +187,0 @@ readonly effort?: string | undefined;

@@ -75,8 +75,4 @@ import { type AtLeastOne, type ProviderAuthOption } from "../route/auth-options";

readonly seed?: number | undefined;
readonly frequency_penalty?: number | undefined;
readonly max_completion_tokens?: number | undefined;
readonly max_tokens?: number | undefined;
readonly presence_penalty?: number | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly tool_choice?: "required" | "none" | "auto" | {

@@ -90,3 +86,8 @@ readonly type: "function";

readonly store?: boolean | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly reasoning_effort?: string | undefined;
readonly frequency_penalty?: number | undefined;
readonly presence_penalty?: number | undefined;
}, import("../route/transport/http").HttpPrepared<string>> | RouteDef<{

@@ -93,0 +94,0 @@ readonly input: readonly ({

@@ -82,8 +82,4 @@ import type { Config, Redacted } from "effect";

readonly seed?: number | undefined;
readonly frequency_penalty?: number | undefined;
readonly max_completion_tokens?: number | undefined;
readonly max_tokens?: number | undefined;
readonly presence_penalty?: number | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly tool_choice?: "required" | "none" | "auto" | {

@@ -97,3 +93,8 @@ readonly type: "function";

readonly store?: boolean | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly reasoning_effort?: string | undefined;
readonly frequency_penalty?: number | undefined;
readonly presence_penalty?: number | undefined;
}, import("../route/transport/http").HttpPrepared<string>>;

@@ -151,8 +152,4 @@ export declare const workersAIRoute: import("../route").Route<{

readonly seed?: number | undefined;
readonly frequency_penalty?: number | undefined;
readonly max_completion_tokens?: number | undefined;
readonly max_tokens?: number | undefined;
readonly presence_penalty?: number | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly tool_choice?: "required" | "none" | "auto" | {

@@ -166,3 +163,8 @@ readonly type: "function";

readonly store?: boolean | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly reasoning_effort?: string | undefined;
readonly frequency_penalty?: number | undefined;
readonly presence_penalty?: number | undefined;
}, import("../route/transport/http").HttpPrepared<string>>;

@@ -220,8 +222,4 @@ export declare const routes: import("../route").Route<{

readonly seed?: number | undefined;
readonly frequency_penalty?: number | undefined;
readonly max_completion_tokens?: number | undefined;
readonly max_tokens?: number | undefined;
readonly presence_penalty?: number | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly tool_choice?: "required" | "none" | "auto" | {

@@ -235,3 +233,8 @@ readonly type: "function";

readonly store?: boolean | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly reasoning_effort?: string | undefined;
readonly frequency_penalty?: number | undefined;
readonly presence_penalty?: number | undefined;
}, import("../route/transport/http").HttpPrepared<string>>[];

@@ -238,0 +241,0 @@ export declare const CloudflareAIGateway: {

@@ -63,8 +63,4 @@ import { type ProviderAuthOption } from "../route/auth-options";

readonly seed?: number | undefined;
readonly frequency_penalty?: number | undefined;
readonly max_completion_tokens?: number | undefined;
readonly max_tokens?: number | undefined;
readonly presence_penalty?: number | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly tool_choice?: "required" | "none" | "auto" | {

@@ -78,3 +74,8 @@ readonly type: "function";

readonly store?: boolean | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly reasoning_effort?: string | undefined;
readonly frequency_penalty?: number | undefined;
readonly presence_penalty?: number | undefined;
}, import("../route/transport/http").HttpPrepared<string>> | import("../route").Route<{

@@ -81,0 +82,0 @@ readonly input: readonly ({

@@ -72,8 +72,4 @@ import type { ProviderPackage } from "../provider-package";

readonly seed?: number | undefined;
readonly frequency_penalty?: number | undefined;
readonly max_completion_tokens?: number | undefined;
readonly max_tokens?: number | undefined;
readonly presence_penalty?: number | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly tool_choice?: "required" | "none" | "auto" | {

@@ -87,3 +83,8 @@ readonly type: "function";

readonly store?: boolean | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly reasoning_effort?: string | undefined;
readonly frequency_penalty?: number | undefined;
readonly presence_penalty?: number | undefined;
}, import("../route/transport/http").HttpPrepared<string>>[];

@@ -90,0 +91,0 @@ export declare const configure: (input?: Config) => {

@@ -180,3 +180,2 @@ import type { ProviderPackage } from "../provider-package";

max_tokens: number;
stop_sequences?: readonly string[] | undefined;
thinking?: {

@@ -197,4 +196,5 @@ readonly type: "enabled";

} | undefined;
top_p?: number | undefined;
top_k?: number | undefined;
top_p?: number | undefined;
stop_sequences?: readonly string[] | undefined;
output_config?: {

@@ -201,0 +201,0 @@ readonly effort?: string | undefined;

@@ -69,2 +69,19 @@ import type { ProviderPackage } from "../provider-package";

}[] | undefined;
readonly toolConfig?: {
readonly functionCallingConfig: {
readonly mode: "AUTO" | "NONE" | "ANY";
readonly allowedFunctionNames?: readonly string[] | undefined;
};
} | undefined;
readonly cachedContent?: string | undefined;
readonly safetySettings?: readonly {
readonly category: string;
readonly threshold: string;
}[] | undefined;
readonly serviceTier?: string | undefined;
readonly systemInstruction?: {
readonly parts: readonly {
readonly text: string;
}[];
} | undefined;
readonly generationConfig?: {

@@ -82,19 +99,2 @@ readonly temperature?: number | undefined;

} | undefined;
readonly systemInstruction?: {
readonly parts: readonly {
readonly text: string;
}[];
} | undefined;
readonly toolConfig?: {
readonly functionCallingConfig: {
readonly mode: "AUTO" | "NONE" | "ANY";
readonly allowedFunctionNames?: readonly string[] | undefined;
};
} | undefined;
readonly cachedContent?: string | undefined;
readonly safetySettings?: readonly {
readonly category: string;
readonly threshold: string;
}[] | undefined;
readonly serviceTier?: string | undefined;
}, import("../route/transport/http").HttpPrepared<string>>[];

@@ -101,0 +101,0 @@ export declare const configure: (input?: Config) => {

@@ -52,2 +52,19 @@ import type { RouteDefaultsInput } from "../route/client";

}[] | undefined;
readonly toolConfig?: {
readonly functionCallingConfig: {
readonly mode: "AUTO" | "NONE" | "ANY";
readonly allowedFunctionNames?: readonly string[] | undefined;
};
} | undefined;
readonly cachedContent?: string | undefined;
readonly safetySettings?: readonly {
readonly category: string;
readonly threshold: string;
}[] | undefined;
readonly serviceTier?: string | undefined;
readonly systemInstruction?: {
readonly parts: readonly {
readonly text: string;
}[];
} | undefined;
readonly generationConfig?: {

@@ -65,19 +82,2 @@ readonly temperature?: number | undefined;

} | undefined;
readonly systemInstruction?: {
readonly parts: readonly {
readonly text: string;
}[];
} | undefined;
readonly toolConfig?: {
readonly functionCallingConfig: {
readonly mode: "AUTO" | "NONE" | "ANY";
readonly allowedFunctionNames?: readonly string[] | undefined;
};
} | undefined;
readonly cachedContent?: string | undefined;
readonly safetySettings?: readonly {
readonly category: string;
readonly threshold: string;
}[] | undefined;
readonly serviceTier?: string | undefined;
}, import("../route/transport/http").HttpPrepared<string>>[];

@@ -84,0 +84,0 @@ export type Config = RouteDefaultsInput & ProviderAuthOption<"optional"> & {

@@ -72,8 +72,4 @@ import { type ModelID } from "../schema";

readonly seed?: number | undefined;
readonly frequency_penalty?: number | undefined;
readonly max_completion_tokens?: number | undefined;
readonly max_tokens?: number | undefined;
readonly presence_penalty?: number | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly tool_choice?: "required" | "none" | "auto" | {

@@ -87,3 +83,8 @@ readonly type: "function";

readonly store?: boolean | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly reasoning_effort?: string | undefined;
readonly frequency_penalty?: number | undefined;
readonly presence_penalty?: number | undefined;
}, import("../route/transport/http").HttpPrepared<string>>[];

@@ -90,0 +91,0 @@ export declare const configure: (input: GenericModelOptions) => {

@@ -61,8 +61,4 @@ import { type ProviderAuthOption } from "../route/auth-options";

readonly seed?: number | undefined;
readonly frequency_penalty?: number | undefined;
readonly max_completion_tokens?: number | undefined;
readonly max_tokens?: number | undefined;
readonly presence_penalty?: number | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly tool_choice?: "required" | "none" | "auto" | {

@@ -76,3 +72,8 @@ readonly type: "function";

readonly store?: boolean | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly reasoning_effort?: string | undefined;
readonly frequency_penalty?: number | undefined;
readonly presence_penalty?: number | undefined;
}, import("../route/transport/http").HttpPrepared<string>> | Route<{

@@ -79,0 +80,0 @@ readonly input: readonly ({

@@ -87,2 +87,3 @@ import { Schema } from "effect";

reasoning_effort: Schema.optional<Schema.String>;
max_completion_tokens: Schema.optional<Schema.Number>;
max_tokens: Schema.optional<Schema.Number>;

@@ -149,8 +150,4 @@ temperature: Schema.optional<Schema.Number>;

readonly seed?: number | undefined;
readonly frequency_penalty?: number | undefined;
readonly max_completion_tokens?: number | undefined;
readonly max_tokens?: number | undefined;
readonly presence_penalty?: number | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly tool_choice?: "required" | "none" | "auto" | {

@@ -164,3 +161,8 @@ readonly type: "function";

readonly store?: boolean | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly reasoning_effort?: string | undefined;
readonly frequency_penalty?: number | undefined;
readonly presence_penalty?: number | undefined;
}, string, {

@@ -256,8 +258,4 @@ readonly error?: {

readonly seed?: number | undefined;
readonly frequency_penalty?: number | undefined;
readonly max_completion_tokens?: number | undefined;
readonly max_tokens?: number | undefined;
readonly presence_penalty?: number | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly tool_choice?: "required" | "none" | "auto" | {

@@ -271,3 +269,8 @@ readonly type: "function";

readonly store?: boolean | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly reasoning_effort?: string | undefined;
readonly frequency_penalty?: number | undefined;
readonly presence_penalty?: number | undefined;
}, import("../route/transport/http").HttpPrepared<string>>;

@@ -326,8 +329,4 @@ export declare const routes: Route<{

readonly seed?: number | undefined;
readonly frequency_penalty?: number | undefined;
readonly max_completion_tokens?: number | undefined;
readonly max_tokens?: number | undefined;
readonly presence_penalty?: number | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly tool_choice?: "required" | "none" | "auto" | {

@@ -341,3 +340,8 @@ readonly type: "function";

readonly store?: boolean | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly reasoning_effort?: string | undefined;
readonly frequency_penalty?: number | undefined;
readonly presence_penalty?: number | undefined;
}, import("../route/transport/http").HttpPrepared<string>>[];

@@ -344,0 +348,0 @@ export declare const configure: (input?: ModelOptions) => {

@@ -71,8 +71,4 @@ import { type ProviderAuthOption } from "../route/auth-options";

readonly seed?: number | undefined;
readonly frequency_penalty?: number | undefined;
readonly max_completion_tokens?: number | undefined;
readonly max_tokens?: number | undefined;
readonly presence_penalty?: number | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly tool_choice?: "required" | "none" | "auto" | {

@@ -86,3 +82,8 @@ readonly type: "function";

readonly store?: boolean | undefined;
readonly stream_options?: {
readonly include_usage: boolean;
} | undefined;
readonly reasoning_effort?: string | undefined;
readonly frequency_penalty?: number | undefined;
readonly presence_penalty?: number | undefined;
}, import("../route/transport/http").HttpPrepared<string>> | Route<{

@@ -89,0 +90,0 @@ readonly input: readonly ({

@@ -15,48 +15,5 @@ import { Effect, Stream } from "effect";

};
const PROTOCOL_BODY_OVERLAY_DENYLIST = new Set([
"anthropic_version",
"content",
"contents",
"frequencyPenalty",
"frequency_penalty",
"generationConfig",
"inferenceConfig",
"input",
"maxTokens",
"max_tokens",
"messages",
"model",
"presencePenalty",
"presence_penalty",
"responseFormat",
"response_format",
"seed",
"stop",
"stopSequences",
"stop_sequences",
"stream",
"streamOptions",
"stream_options",
"system",
"systemInstruction",
"system_instruction",
"temperature",
"thinking",
"toolChoice",
"toolConfig",
"tool_choice",
"tool_config",
"tools",
"topK",
"topP",
"top_k",
"top_p",
]);
const forbiddenBodyOverlayKeys = (body) => Object.keys(body).filter((key) => PROTOCOL_BODY_OVERLAY_DENYLIST.has(key));
const bodyWithOverlay = (body, request, encodeBody) => Effect.gen(function* () {
if (request.http?.body === undefined)
return { jsonBody: body, bodyText: encodeBody(body) };
const forbiddenKeys = forbiddenBodyOverlayKeys(request.http.body);
if (forbiddenKeys.length > 0)
return yield* ProviderShared.invalidRequest(`http.body cannot overlay protocol-owned field(s): ${forbiddenKeys.join(", ")}`);
if (ProviderShared.isRecord(body)) {

@@ -63,0 +20,0 @@ const overlaid = mergeJsonRecords(body, request.http.body) ?? {};

@@ -82,5 +82,8 @@ import { Schema } from "effect";

export type ModelToolSchemaCompatibility = Schema.Schema.Type<typeof ModelToolSchemaCompatibility>;
export declare const ModelMaxTokensFieldCompatibility: Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>;
export type ModelMaxTokensFieldCompatibility = Schema.Schema.Type<typeof ModelMaxTokensFieldCompatibility>;
declare const ModelCompatibility_base: Schema.Class<ModelCompatibility, Schema.Struct<{
readonly toolSchema: Schema.optional<Schema.Literals<readonly ["gemini", "moonshot"]>>;
readonly reasoningField: Schema.optional<Schema.String>;
readonly maxTokensField: Schema.optional<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>;
}>, {}>;

@@ -87,0 +90,0 @@ export declare class ModelCompatibility extends ModelCompatibility_base {

@@ -121,5 +121,7 @@ import { Schema } from "effect";

export const ModelToolSchemaCompatibility = Schema.Literals(["gemini", "moonshot"]);
export const ModelMaxTokensFieldCompatibility = Schema.Literals(["max_completion_tokens", "max_tokens"]);
export class ModelCompatibility extends Schema.Class("LLM.ModelCompatibility")({
toolSchema: Schema.optional(ModelToolSchemaCompatibility),
reasoningField: Schema.optional(Schema.String),
maxTokensField: Schema.optional(ModelMaxTokensFieldCompatibility),
}) {

@@ -126,0 +128,0 @@ }

{
"$schema": "https://json.schemastore.org/package.json",
"version": "0.0.0-next-16599",
"version": "0.0.0-next-16600",
"name": "@opencode-ai/ai",

@@ -33,3 +33,3 @@ "type": "module",

"@effect/platform-node": "4.0.0-beta.101",
"@opencode-ai/http-recorder": "0.0.0-next-16599",
"@opencode-ai/http-recorder": "0.0.0-next-16600",
"@tsconfig/bun": "1.0.9",

@@ -43,3 +43,3 @@ "@types/bun": "1.3.13",

"@smithy/util-utf8": "4.2.2",
"@opencode-ai/schema": "0.0.0-next-16599",
"@opencode-ai/schema": "0.0.0-next-16600",
"aws4fetch": "1.0.20",

@@ -46,0 +46,0 @@ "effect": "4.0.0-beta.101",