|
| 1 | +diff --git a/packages/ai/openrouter/src/Generated.ts b/packages/ai/openrouter/src/Generated.ts |
| 2 | +index 59722a09d..70484d1d7 100644 |
| 3 | +--- a/packages/ai/openrouter/src/Generated.ts |
| 4 | ++++ b/packages/ai/openrouter/src/Generated.ts |
| 5 | +@@ -10,6 +10,118 @@ import * as Effect from "effect/Effect" |
| 6 | + import type { ParseError } from "effect/ParseResult" |
| 7 | + import * as S from "effect/Schema" |
| 8 | + |
| 9 | ++export class CacheControlEphemeral extends S.Class<CacheControlEphemeral>("CacheControlEphemeral")({ |
| 10 | ++ "type": S.Literal("ephemeral") |
| 11 | ++}) {} |
| 12 | ++ |
| 13 | ++export class ReasoningDetailSummaryType extends S.Literal("reasoning.summary") {} |
| 14 | ++ |
| 15 | ++export class ReasoningDetailSummaryFormat extends S.Literal("unknown", "openai-responses-v1", "anthropic-claude-v1") {} |
| 16 | ++ |
| 17 | ++/** |
| 18 | ++ * Reasoning summary detail |
| 19 | ++ */ |
| 20 | ++export class ReasoningDetailSummary extends S.Class<ReasoningDetailSummary>("ReasoningDetailSummary")({ |
| 21 | ++ "type": ReasoningDetailSummaryType, |
| 22 | ++ "summary": S.String, |
| 23 | ++ "id": S.optionalWith(S.String, { nullable: true }), |
| 24 | ++ "format": S.optionalWith(ReasoningDetailSummaryFormat, { |
| 25 | ++ nullable: true, |
| 26 | ++ default: () => "anthropic-claude-v1" as const |
| 27 | ++ }), |
| 28 | ++ "index": S.optionalWith(S.Number, { nullable: true }) |
| 29 | ++}) {} |
| 30 | ++ |
| 31 | ++export class ReasoningDetailEncryptedType extends S.Literal("reasoning.encrypted") {} |
| 32 | ++ |
| 33 | ++export class ReasoningDetailEncryptedFormat |
| 34 | ++ extends S.Literal("unknown", "openai-responses-v1", "anthropic-claude-v1") |
| 35 | ++{} |
| 36 | ++ |
| 37 | ++/** |
| 38 | ++ * Encrypted reasoning detail |
| 39 | ++ */ |
| 40 | ++export class ReasoningDetailEncrypted extends S.Class<ReasoningDetailEncrypted>("ReasoningDetailEncrypted")({ |
| 41 | ++ "type": ReasoningDetailEncryptedType, |
| 42 | ++ "data": S.String, |
| 43 | ++ "id": S.optionalWith(S.String, { nullable: true }), |
| 44 | ++ "format": S.optionalWith(ReasoningDetailEncryptedFormat, { |
| 45 | ++ nullable: true, |
| 46 | ++ default: () => "anthropic-claude-v1" as const |
| 47 | ++ }), |
| 48 | ++ "index": S.optionalWith(S.Number, { nullable: true }) |
| 49 | ++}) {} |
| 50 | ++ |
| 51 | ++export class ReasoningDetailTextType extends S.Literal("reasoning.text") {} |
| 52 | ++ |
| 53 | ++export class ReasoningDetailTextFormat extends S.Literal("unknown", "openai-responses-v1", "anthropic-claude-v1") {} |
| 54 | ++ |
| 55 | ++/** |
| 56 | ++ * Text reasoning detail |
| 57 | ++ */ |
| 58 | ++export class ReasoningDetailText extends S.Class<ReasoningDetailText>("ReasoningDetailText")({ |
| 59 | ++ "type": ReasoningDetailTextType, |
| 60 | ++ "text": S.optionalWith(S.String, { nullable: true }), |
| 61 | ++ "signature": S.optionalWith(S.String, { nullable: true }), |
| 62 | ++ "id": S.optionalWith(S.String, { nullable: true }), |
| 63 | ++ "format": S.optionalWith(ReasoningDetailTextFormat, { |
| 64 | ++ nullable: true, |
| 65 | ++ default: () => "anthropic-claude-v1" as const |
| 66 | ++ }), |
| 67 | ++ "index": S.optionalWith(S.Number, { nullable: true }) |
| 68 | ++}) {} |
| 69 | ++ |
| 70 | ++/** |
| 71 | ++ * Reasoning detail information |
| 72 | ++ */ |
| 73 | ++export class ReasoningDetail extends S.Union(ReasoningDetailSummary, ReasoningDetailEncrypted, ReasoningDetailText) {} |
| 74 | ++ |
| 75 | ++export class FileAnnotationDetailType extends S.Literal("file") {} |
| 76 | ++ |
| 77 | ++/** |
| 78 | ++ * File annotation with content |
| 79 | ++ */ |
| 80 | ++export class FileAnnotationDetail extends S.Class<FileAnnotationDetail>("FileAnnotationDetail")({ |
| 81 | ++ "type": FileAnnotationDetailType, |
| 82 | ++ "file": S.Struct({ |
| 83 | ++ "hash": S.String, |
| 84 | ++ "name": S.optionalWith(S.String, { nullable: true }), |
| 85 | ++ "content": S.Array(S.Union( |
| 86 | ++ S.Struct({ |
| 87 | ++ "type": S.Literal("text"), |
| 88 | ++ "text": S.String |
| 89 | ++ }), |
| 90 | ++ S.Struct({ |
| 91 | ++ "type": S.Literal("image_url"), |
| 92 | ++ "image_url": S.Struct({ |
| 93 | ++ "url": S.String |
| 94 | ++ }) |
| 95 | ++ }) |
| 96 | ++ )) |
| 97 | ++ }) |
| 98 | ++}) {} |
| 99 | ++ |
| 100 | ++export class URLCitationAnnotationDetailType extends S.Literal("url_citation") {} |
| 101 | ++ |
| 102 | ++/** |
| 103 | ++ * URL citation annotation |
| 104 | ++ */ |
| 105 | ++export class URLCitationAnnotationDetail extends S.Class<URLCitationAnnotationDetail>("URLCitationAnnotationDetail")({ |
| 106 | ++ "type": URLCitationAnnotationDetailType, |
| 107 | ++ "url_citation": S.Struct({ |
| 108 | ++ "end_index": S.Number, |
| 109 | ++ "start_index": S.Number, |
| 110 | ++ "title": S.String, |
| 111 | ++ "url": S.String, |
| 112 | ++ "content": S.optionalWith(S.String, { nullable: true }) |
| 113 | ++ }) |
| 114 | ++}) {} |
| 115 | ++ |
| 116 | ++/** |
| 117 | ++ * Annotation information |
| 118 | ++ */ |
| 119 | ++export class AnnotationDetail extends S.Union(FileAnnotationDetail, URLCitationAnnotationDetail) {} |
| 120 | ++ |
| 121 | + export class OpenResponsesReasoningFormat |
| 122 | + extends S.Literal("unknown", "openai-responses-v1", "xai-responses-v1", "anthropic-claude-v1", "google-gemini-v1") |
| 123 | + {} |
| 124 | +@@ -2795,7 +2907,10 @@ export class AssistantMessage extends S.Class<AssistantMessage>("AssistantMessag |
| 125 | + "name": S.optionalWith(S.String, { nullable: true }), |
| 126 | + "tool_calls": S.optionalWith(S.Array(ChatMessageToolCall), { nullable: true }), |
| 127 | + "refusal": S.optionalWith(S.String, { nullable: true }), |
| 128 | +- "reasoning": S.optionalWith(S.String, { nullable: true }) |
| 129 | ++ "reasoning": S.optionalWith(S.String, { nullable: true }), |
| 130 | ++ "reasoning_details": S.optionalWith(S.Array(ReasoningDetail), { nullable: true }), |
| 131 | ++ "images": S.optionalWith(S.Array(ChatMessageContentItemImage), { nullable: true }), |
| 132 | ++ "annotations": S.optionalWith(S.Array(AnnotationDetail), { nullable: true }) |
| 133 | + }) {} |
| 134 | + |
| 135 | + export class ToolResponseMessage extends S.Class<ToolResponseMessage>("ToolResponseMessage")({ |
| 136 | +@@ -2913,8 +3028,8 @@ export class ChatMessageTokenLogprob extends S.Class<ChatMessageTokenLogprob>("C |
| 137 | + }) {} |
| 138 | + |
| 139 | + export class ChatMessageTokenLogprobs extends S.Class<ChatMessageTokenLogprobs>("ChatMessageTokenLogprobs")({ |
| 140 | +- "content": S.NullOr(S.Array(ChatMessageTokenLogprob)), |
| 141 | +- "refusal": S.NullOr(S.Array(ChatMessageTokenLogprob)) |
| 142 | ++ "content": S.optionalWith(S.Array(ChatMessageTokenLogprob), { nullable: true }), |
| 143 | ++ "refusal": S.optionalWith(S.Array(ChatMessageTokenLogprob), { nullable: true }) |
| 144 | + }) {} |
| 145 | + |
| 146 | + export class ChatResponseChoice extends S.Class<ChatResponseChoice>("ChatResponseChoice")({ |
| 147 | +@@ -2928,6 +3043,13 @@ export class ChatGenerationTokenUsage extends S.Class<ChatGenerationTokenUsage>( |
| 148 | + "completion_tokens": S.Number, |
| 149 | + "prompt_tokens": S.Number, |
| 150 | + "total_tokens": S.Number, |
| 151 | ++ "cost": S.optionalWith(S.Number, { nullable: true }), |
| 152 | ++ "cost_details": S.optionalWith( |
| 153 | ++ S.Struct({ |
| 154 | ++ upstream_inference_cost: S.optionalWith(S.Number, { nullable: true }) |
| 155 | ++ }), |
| 156 | ++ { nullable: true } |
| 157 | ++ ), |
| 158 | + "completion_tokens_details": S.optionalWith( |
| 159 | + S.Struct({ |
| 160 | + "reasoning_tokens": S.optionalWith(S.Number, { nullable: true }), |
| 161 | +@@ -2949,6 +3071,7 @@ export class ChatGenerationTokenUsage extends S.Class<ChatGenerationTokenUsage>( |
| 162 | + |
| 163 | + export class ChatResponse extends S.Class<ChatResponse>("ChatResponse")({ |
| 164 | + "id": S.String, |
| 165 | ++ "provider": S.optionalWith(S.String, { nullable: true }), |
| 166 | + "choices": S.Array(ChatResponseChoice), |
| 167 | + "created": S.Number, |
| 168 | + "model": S.String, |
0 commit comments