wip console

This commit is contained in:
Frank
2025-09-03 09:24:23 -04:00
parent fca2bddc3b
commit 0f8cb69bff
3 changed files with 16 additions and 30 deletions

View File

@@ -1,23 +1,5 @@
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"frank": {
"npm": "@ai-sdk/openai-compatible",
"name": "My AI ProviderDisplay Name",
"env": ["OPENCODE_API_KEY"],
"options": {
"baseURL": "https://console.frank.dev.opencode.ai/gateway/v1"
},
"models": {
"x-ai/grok-code-fast-1": {
"name": "Grok Code Fast 1"
},
"qwen/qwen3-coder": {
"name": "Qwen 3 Coder"
}
}
}
},
"mcp": {
"weather": {
"type": "local",

View File

@@ -103,12 +103,13 @@ export const AuthLoginCommand = cmd({
await ModelsDev.refresh().catch(() => {})
const providers = await ModelsDev.get()
const priority: Record<string, number> = {
anthropic: 0,
"github-copilot": 1,
openai: 2,
google: 3,
openrouter: 4,
vercel: 5,
opencode: 0,
anthropic: 1,
"github-copilot": 2,
openai: 3,
google: 4,
openrouter: 5,
vercel: 6,
}
let provider = await prompts.autocomplete({
message: "Select provider",
@@ -124,7 +125,7 @@ export const AuthLoginCommand = cmd({
map((x) => ({
label: x.name,
value: x.id,
hint: priority[x.id] === 0 ? "recommended" : undefined,
hint: priority[x.id] <= 1 ? "recommended" : undefined,
})),
),
{

View File

@@ -93,10 +93,13 @@ export const GithubInstallCommand = cmd({
async function promptProvider() {
const priority: Record<string, number> = {
anthropic: 0,
"github-copilot": 1,
openai: 2,
google: 3,
opencode: 0,
anthropic: 1,
"github-copilot": 2,
openai: 3,
google: 4,
openrouter: 5,
vercel: 6,
}
let provider = await prompts.select({
message: "Select provider",
@@ -111,7 +114,7 @@ export const GithubInstallCommand = cmd({
map((x) => ({
label: x.name,
value: x.id,
hint: priority[x.id] === 0 ? "recommended" : undefined,
hint: priority[x.id] <= 1 ? "recommended" : undefined,
})),
),
})