Auto-discover OpenCode Zen and Go models, add catalog search and pagination
All checks were successful
CI / lint-and-test (push) Successful in 29s
Deploy Production / deploy (push) Successful in 3m40s
CI / build (push) Successful in 1m34s

Add model fetchers for OpenCode Zen (https://opencode.ai/zen/v1/models) and
Go (https://opencode.ai/zen/go/v1/models) APIs. Register opencode-go as a new
provider, load shared credentials from auth.json, add known models with pricing,
and create default agents for both tiers on first boot.

Replace the manual "Add Model" form with a search bar that filters by model
name/ID and paginate the catalog at 25 models per page.
This commit is contained in:
Julia McGhee
2026-03-21 20:24:38 +00:00
parent f0d9482bc8
commit e2b339aac8
6 changed files with 183 additions and 134 deletions

View File

@@ -4,10 +4,10 @@ import { credentials as credentialsTable } from "@homelab/db";
export type Provider =
| "github" | "gitlab"
| "anthropic" | "openai" | "openrouter" | "google" | "opencode-zen";
| "anthropic" | "openai" | "openrouter" | "google" | "opencode-zen" | "opencode-go";
export const GIT_PROVIDERS: Provider[] = ["github", "gitlab"];
export const AI_PROVIDERS: Provider[] = ["anthropic", "openai", "openrouter", "google", "opencode-zen"];
export const AI_PROVIDERS: Provider[] = ["anthropic", "openai", "openrouter", "google", "opencode-zen", "opencode-go"];
export interface Credential {
id: string;