@opencode/schema 0.0.0-dev-75 → 0.0.0-dev-81
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.
|
@@ -11,22 +11,27 @@ export type CacheFormat = typeof CacheFormat.Type;
|
|
|
11
11
|
export interface Compatibility extends Schema.Schema.Type<typeof Compatibility> {
|
|
12
12
|
}
|
|
13
13
|
export declare const Compatibility: Schema.Struct<{
|
|
14
|
+
/** OpenAI Chat: assistant-message field that carries reasoning. Unset uses the streamed field, else `reasoning_content`. */
|
|
14
15
|
readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<ReasoningField, ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<ReasoningField, ReasoningField, never, never>>, never, never>;
|
|
15
|
-
/**
|
|
16
|
+
/** OpenAI Chat: send the reasoning field on every prior assistant message, even when empty. */
|
|
16
17
|
readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
18
|
+
/** OpenAI Chat: body field for the output token limit. Unset detects it from the provider. */
|
|
17
19
|
readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>;
|
|
20
|
+
/** OpenAI Chat: fail a stream that ends without `finish_reason`. Defaults to true. */
|
|
18
21
|
readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
22
|
+
/** OpenAI Chat: insert an assistant message between a tool result and the next user message. */
|
|
19
23
|
readonly requireAssistantAfterTool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
24
|
+
/** OpenAI Chat, OpenAI Responses and Mistral: whether the endpoint accepts `prompt_cache_key`. */
|
|
20
25
|
readonly supportsPromptCacheKey: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
21
|
-
/**
|
|
26
|
+
/** OpenAI Chat: request usage in the stream with `stream_options.include_usage`. Defaults to true. */
|
|
22
27
|
readonly streamUsage: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
23
28
|
/** Prompt-cache marker syntax the endpoint accepts. Overrides the route default; both send `cache_control`, and `alibaba` skips tool definitions. */
|
|
24
29
|
readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
|
|
25
|
-
/**
|
|
30
|
+
/** Anthropic Messages and Bedrock Converse: supports Anthropic's thinking-prefix mismatch controls. Overrides model-ID detection. */
|
|
26
31
|
readonly supportsThinkingBlockBinding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
27
|
-
/**
|
|
32
|
+
/** Anthropic Messages and OpenAI Responses: supports per-message effort updates. Overrides model-ID detection. */
|
|
28
33
|
readonly supportsEffortUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
29
|
-
/**
|
|
34
|
+
/** System One: where the decision host reads media. Unset keeps the route default. */
|
|
30
35
|
readonly mediaInput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["assets", "state", "root"]>>>, Schema.optionalKey<Schema.Literals<readonly ["assets", "state", "root"]>>, never, never>;
|
|
31
36
|
}>;
|
|
32
37
|
export interface ProviderCompatibility extends Schema.Schema.Type<typeof ProviderCompatibility> {
|
|
@@ -13,22 +13,27 @@ export const MediaInput = Schema.Literals(["assets", "state", "root"]).annotate(
|
|
|
13
13
|
});
|
|
14
14
|
export const CacheFormat = Schema.Literals(["anthropic", "alibaba"]).annotate({ identifier: "Model.CacheFormat" });
|
|
15
15
|
export const Compatibility = Schema.Struct({
|
|
16
|
+
/** OpenAI Chat: assistant-message field that carries reasoning. Unset uses the streamed field, else `reasoning_content`. */
|
|
16
17
|
reasoningField: ReasoningField.pipe(optional),
|
|
17
|
-
/**
|
|
18
|
+
/** OpenAI Chat: send the reasoning field on every prior assistant message, even when empty. */
|
|
18
19
|
requireReasoning: Schema.Boolean.pipe(optional),
|
|
20
|
+
/** OpenAI Chat: body field for the output token limit. Unset detects it from the provider. */
|
|
19
21
|
maxTokensField: MaxTokensField.pipe(optional),
|
|
22
|
+
/** OpenAI Chat: fail a stream that ends without `finish_reason`. Defaults to true. */
|
|
20
23
|
requireFinishReason: Schema.Boolean.pipe(optional),
|
|
24
|
+
/** OpenAI Chat: insert an assistant message between a tool result and the next user message. */
|
|
21
25
|
requireAssistantAfterTool: Schema.Boolean.pipe(optional),
|
|
26
|
+
/** OpenAI Chat, OpenAI Responses and Mistral: whether the endpoint accepts `prompt_cache_key`. */
|
|
22
27
|
supportsPromptCacheKey: Schema.Boolean.pipe(optional),
|
|
23
|
-
/**
|
|
28
|
+
/** OpenAI Chat: request usage in the stream with `stream_options.include_usage`. Defaults to true. */
|
|
24
29
|
streamUsage: Schema.Boolean.pipe(optional),
|
|
25
30
|
/** Prompt-cache marker syntax the endpoint accepts. Overrides the route default; both send `cache_control`, and `alibaba` skips tool definitions. */
|
|
26
31
|
cacheFormat: CacheFormat.pipe(optional),
|
|
27
|
-
/**
|
|
32
|
+
/** Anthropic Messages and Bedrock Converse: supports Anthropic's thinking-prefix mismatch controls. Overrides model-ID detection. */
|
|
28
33
|
supportsThinkingBlockBinding: Schema.Boolean.pipe(optional),
|
|
29
|
-
/**
|
|
34
|
+
/** Anthropic Messages and OpenAI Responses: supports per-message effort updates. Overrides model-ID detection. */
|
|
30
35
|
supportsEffortUpdates: Schema.Boolean.pipe(optional),
|
|
31
|
-
/**
|
|
36
|
+
/** System One: where the decision host reads media. Unset keeps the route default. */
|
|
32
37
|
mediaInput: MediaInput.pipe(optional),
|
|
33
38
|
}).annotate({ identifier: "Model.Compatibility" });
|
|
34
39
|
export const ProviderCompatibility = Schema.Struct(Struct.omit(Compatibility.fields, ["supportsThinkingBlockBinding", "supportsEffortUpdates"])).annotate({ identifier: "Provider.Compatibility" });
|