@jaypie/llm 1.2.32 → 1.2.33

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.
@@ -82,11 +82,26 @@ interface OpenRouterRequest {
82
82
  user?: string;
83
83
  }
84
84
  /**
85
- * OpenRouter content part types (text only - images/files not supported)
85
+ * OpenRouter content part types. OpenRouter follows the OpenAI Chat
86
+ * Completions multimodal schema and forwards `image_url` and `file` parts
87
+ * to vision/PDF-capable backends. The SDK accepts camelCase fields at the
88
+ * input boundary (`imageUrl`, `fileData`) and transforms to snake_case on
89
+ * the wire.
86
90
  */
87
91
  type OpenRouterContentPart = {
88
92
  type: "text";
89
93
  text: string;
94
+ } | {
95
+ type: "image_url";
96
+ imageUrl: {
97
+ url: string;
98
+ };
99
+ } | {
100
+ type: "file";
101
+ file: {
102
+ filename?: string;
103
+ fileData: string;
104
+ };
90
105
  };
91
106
  /**
92
107
  * OpenRouterAdapter implements the ProviderAdapter interface for OpenRouter's API.
@@ -101,6 +116,10 @@ export declare class OpenRouterAdapter extends BaseProviderAdapter {
101
116
  rememberModelRejectsStructuredOutput(model: string): void;
102
117
  clearRuntimeNoStructuredOutputModels(): void;
103
118
  private supportsStructuredOutput;
119
+ private runtimeNoTemperatureModels;
120
+ rememberModelRejectsTemperature(model: string): void;
121
+ clearRuntimeNoTemperatureModels(): void;
122
+ private supportsTemperature;
104
123
  buildRequest(request: OperateRequest): OpenRouterRequest;
105
124
  formatTools(toolkit: Toolkit, _outputSchema?: JsonObject): ProviderToolDefinition[];
106
125
  formatOutputSchema(schema: JsonObject | NaturalSchema | z.ZodType): JsonObject;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaypie/llm",
3
- "version": "1.2.32",
3
+ "version": "1.2.33",
4
4
  "description": "Large language model utilities",
5
5
  "repository": {
6
6
  "type": "git",