@opencode-ai/ai
Advanced tools
@@ -6,2 +6,3 @@ import { Schema } from "effect"; | ||
| import { type ModelID, type ProviderOptions } from "../schema"; | ||
| import type { ProviderPackage } from "../provider-package"; | ||
| import * as OpenAIChat from "../protocols/openai-chat"; | ||
@@ -26,2 +27,7 @@ export declare const profile: { | ||
| }; | ||
| export interface Settings extends ProviderPackage.Settings { | ||
| readonly apiKey?: string; | ||
| readonly baseURL?: string; | ||
| readonly providerOptions?: OpenRouterProviderOptionsInput; | ||
| } | ||
| declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{ | ||
@@ -347,3 +353,3 @@ model: Schema.String; | ||
| }; | ||
| export declare const model: (modelID: string | ModelID) => import("..").Model<OpenRouterProviderOptionsInput>; | ||
| export declare const model: ProviderPackage.Definition<Settings, OpenRouterProviderOptionsInput>["model"]; | ||
| export {}; |
@@ -87,2 +87,9 @@ import { Effect, Schema } from "effect"; | ||
| export const provider = configure(); | ||
| export const model = provider.model; | ||
| export const model = (modelID, settings) => configure({ | ||
| apiKey: settings.apiKey, | ||
| baseURL: settings.baseURL, | ||
| headers: settings.headers, | ||
| http: settings.body === undefined ? undefined : { body: { ...settings.body } }, | ||
| limits: settings.limits, | ||
| providerOptions: settings.providerOptions, | ||
| }).model(modelID); |
@@ -5,2 +5,3 @@ import { type ProviderAuthOption } from "../route/auth-options"; | ||
| import type { OpenAIProviderOptionsInput } from "./openai-options"; | ||
| import type { ProviderPackage } from "../provider-package"; | ||
| export declare const id: string & import("effect/Brand").Brand<"LLM.ProviderID">; | ||
@@ -11,2 +12,7 @@ export type ModelOptions = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & { | ||
| }; | ||
| export interface Settings extends ProviderPackage.Settings { | ||
| readonly apiKey?: string; | ||
| readonly baseURL?: string; | ||
| readonly providerOptions?: OpenAIProviderOptionsInput; | ||
| } | ||
| export type { XAIImageOptions } from "../protocols/xai-images"; | ||
@@ -209,5 +215,5 @@ export declare const routes: (import("../route").Route<{ | ||
| }; | ||
| export declare const model: (modelID: string | ModelID) => import("..").Model<OpenAIProviderOptionsInput>; | ||
| export declare const model: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"]; | ||
| export declare const responses: (modelID: string | ModelID) => import("..").Model<OpenAIProviderOptionsInput>; | ||
| export declare const chat: (modelID: string | ModelID) => import("..").Model<OpenAIProviderOptionsInput>; | ||
| export declare const image: (modelID: string | ModelID) => import("..").ImageModel<import("./xai").XAIImageOptions>; |
@@ -50,5 +50,12 @@ import { AuthOptions } from "../route/auth-options"; | ||
| export const provider = configure(); | ||
| export const model = provider.model; | ||
| export const model = (modelID, settings) => configure({ | ||
| apiKey: settings.apiKey, | ||
| baseURL: settings.baseURL, | ||
| headers: settings.headers, | ||
| http: settings.body === undefined ? undefined : { body: { ...settings.body } }, | ||
| limits: settings.limits, | ||
| providerOptions: settings.providerOptions, | ||
| }).model(modelID); | ||
| export const responses = provider.responses; | ||
| export const chat = provider.chat; | ||
| export const image = provider.image; |
+3
-3
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "version": "0.0.0-next-16499", | ||
| "version": "0.0.0-next-16500", | ||
| "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-16499", | ||
| "@opencode-ai/http-recorder": "0.0.0-next-16500", | ||
| "@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-16499", | ||
| "@opencode-ai/schema": "0.0.0-next-16500", | ||
| "aws4fetch": "1.0.20", | ||
@@ -46,0 +46,0 @@ "effect": "4.0.0-beta.101", |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
1076123
0.1%25134
0.1%+ Added
- Removed