@opencode/ai 0.0.0-dev-20845 → 0.0.0-dev-20847
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.
package/README.md
CHANGED
|
@@ -182,7 +182,7 @@ console.log(response.answers.department.choice)
|
|
|
182
182
|
console.log(response.answers.refund.probability)
|
|
183
183
|
```
|
|
184
184
|
|
|
185
|
-
`TypeSafeAI` reads `TYPESAFE_API_KEY`. `
|
|
185
|
+
`TypeSafeAI` reads `TYPESAFE_API_KEY`. `OpenCode` exposes the same selector and reads
|
|
186
186
|
`OPENCODE_API_KEY`. OpenRouter and Vercel AI Gateway use the same provider shape:
|
|
187
187
|
|
|
188
188
|
```ts
|
|
@@ -34,7 +34,7 @@ export * as Moonshot from "./moonshot.js";
|
|
|
34
34
|
export * as OpenAI from "./openai.js";
|
|
35
35
|
export * as OpenAICompatible from "./openai-compatible.js";
|
|
36
36
|
export * as OpenAICompatibleResponses from "./openai-compatible-responses.js";
|
|
37
|
-
export * as
|
|
37
|
+
export * as OpenCode from "./opencode.js";
|
|
38
38
|
export * as OpenRouter from "./openrouter.js";
|
|
39
39
|
export * as Replicate from "./replicate.js";
|
|
40
40
|
export * as Runway from "./runway.js";
|
package/dist/providers/index.js
CHANGED
|
@@ -34,7 +34,7 @@ export * as Moonshot from "./moonshot.js";
|
|
|
34
34
|
export * as OpenAI from "./openai.js";
|
|
35
35
|
export * as OpenAICompatible from "./openai-compatible.js";
|
|
36
36
|
export * as OpenAICompatibleResponses from "./openai-compatible-responses.js";
|
|
37
|
-
export * as
|
|
37
|
+
export * as OpenCode from "./opencode.js";
|
|
38
38
|
export * as OpenRouter from "./openrouter.js";
|
|
39
39
|
export * as Replicate from "./replicate.js";
|
|
40
40
|
export * as Runway from "./runway.js";
|
|
@@ -29,4 +29,4 @@ export declare const provider: {
|
|
|
29
29
|
export declare const experimental: {
|
|
30
30
|
evaluation: (modelID: string | ModelID) => import("../experimental.js").EvaluationModel<import("../experimental.js").EvaluationOptions>;
|
|
31
31
|
};
|
|
32
|
-
export * as
|
|
32
|
+
export * as OpenCode from "./opencode.js";
|
|
@@ -2,7 +2,7 @@ import { HttpOptions, ProviderID } from "../schema/index.js";
|
|
|
2
2
|
import { AuthOptions } from "../route/auth-options.js";
|
|
3
3
|
import { SystemOne } from "../experimental/system-one.js";
|
|
4
4
|
export const id = ProviderID.make("opencode");
|
|
5
|
-
const baseURL = "https://opencode.ai/
|
|
5
|
+
const baseURL = "https://opencode.ai/inference/v1";
|
|
6
6
|
export const configure = (input = {}) => {
|
|
7
7
|
const evaluation = (modelID) => SystemOne.model({
|
|
8
8
|
id: modelID,
|
|
@@ -17,4 +17,4 @@ export const configure = (input = {}) => {
|
|
|
17
17
|
};
|
|
18
18
|
export const provider = configure();
|
|
19
19
|
export const experimental = provider.experimental;
|
|
20
|
-
export * as
|
|
20
|
+
export * as OpenCode from "./opencode.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20847",
|
|
4
4
|
"name": "@opencode/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
36
36
|
"@effect/platform-node": "4.0.1",
|
|
37
|
-
"@opencode/http-recorder": "0.0.0-dev-
|
|
37
|
+
"@opencode/http-recorder": "0.0.0-dev-20847",
|
|
38
38
|
"@tsconfig/bun": "1.0.9",
|
|
39
39
|
"@types/bun": "1.4.0",
|
|
40
40
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@aws-sdk/credential-providers": "3.1057.0",
|
|
45
45
|
"@smithy/eventstream-codec": "4.2.14",
|
|
46
46
|
"@smithy/util-utf8": "4.2.2",
|
|
47
|
-
"@opencode/schema": "0.0.0-dev-
|
|
47
|
+
"@opencode/schema": "0.0.0-dev-20847",
|
|
48
48
|
"aws4fetch": "1.0.20",
|
|
49
49
|
"effect": "4.0.1",
|
|
50
50
|
"google-auth-library": "10.5.0"
|