Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions example/broken.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('broken');
1 change: 1 addition & 0 deletions example/cli.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('cli');
1 change: 1 addition & 0 deletions example/ink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('ink');
3 changes: 2 additions & 1 deletion packages/opencode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"xdg-basedir": "5.1.0",
"yargs": "18.0.0",
"zod": "catalog:",
"zod-openapi": "4.1.0"
"zod-openapi": "4.1.0",
"@ai-sdk/groq": "1.2.9"
}
}
1 change: 1 addition & 0 deletions packages/opencode/src/bun/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export namespace BunProc {
// Let Bun handle registry resolution:
// - If .npmrc files exist, Bun will use them automatically
// - If no .npmrc files exist, Bun will default to https://registry.npmjs.org
// No need to pass --registry flag
log.info("installing package using Bun's default registry resolution", { pkg, version })

await BunProc.run(args, {
Expand Down
6 changes: 6 additions & 0 deletions packages/opencode/src/provider/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@ export namespace Provider {
},
}
},
groq: async () => {
return {
autoload: false,
options: {},
}
},
}

const state = App.state("provider", async () => {
Expand Down
15 changes: 15 additions & 0 deletions packages/opencode/test/provider/groq.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { describe, test, expect } from "bun:test"
import { Provider } from "../../src/provider/provider"
import { App } from "../../src/app/app"

process.env.GROQ_API_KEY = "test"

describe("provider.groq", () => {
test("loads from env", async () => {
const providers = await App.provide({ cwd: process.cwd() }, async () => {
return await Provider.list()
})
expect(providers["groq"]).toBeTruthy()
expect(providers["groq"].info.models["moonshotai/kimi-k2-instruct"]).toBeTruthy()
})
})