v0.50.1 a637010

providers.go RawHistoryFolder

1package provider
2
3// Provider IDs are compile-time constants used by model metadata, routing,
4// discovery, and credential selection. Go has no enum type with string
5// interoperability, so untyped constants keep the existing public string
6// fields and wire formats while giving provider ownership one source of truth.
7const (
8	ProviderAnthropic            = "anthropic"
9	ProviderOpenAI               = "openai"
10	ProviderOpenAICodex          = "openai-codex"
11	ProviderOpenAIResponses      = "openai-responses"
12	ProviderKimi                 = "kimi"
13	ProviderDeepSeek             = "deepseek"
14	ProviderGoogle               = "google"
15	ProviderOllama               = "ollama"
16	ProviderLlamaCPP             = "llama.cpp"
17	ProviderMoonshot             = "moonshotai"
18	ProviderMoonshotCN           = "moonshotai-cn"
19	ProviderCerebras             = "cerebras"
20	ProviderGroq                 = "groq"
21	ProviderXAI                  = "xai"
22	ProviderTogether             = "together"
23	ProviderHuggingFace          = "huggingface"
24	ProviderOpenRouter           = "openrouter"
25	ProviderMistral              = "mistral"
26	ProviderZAI                  = "zai"
27	ProviderXiaomi               = "xiaomi"
28	ProviderXiaomiTokenPlanAMS   = "xiaomi-token-plan-ams"
29	ProviderXiaomiTokenPlanCN    = "xiaomi-token-plan-cn"
30	ProviderXiaomiTokenPlanSGP   = "xiaomi-token-plan-sgp"
31	ProviderMiniMax              = "minimax"
32	ProviderMiniMaxCN            = "minimax-cn"
33	ProviderFireworks            = "fireworks"
34	ProviderVercelAIGateway      = "vercel-ai-gateway"
35	ProviderOpenCode             = "opencode"
36	ProviderOpenCodeGo           = "opencode-go"
37	ProviderAmazonBedrock        = "amazon-bedrock"
38	ProviderGoogleVertex         = "google-vertex"
39	ProviderAzureOpenAIResponses = "azure-openai-responses"
40	ProviderGitHubCopilot        = "github-copilot"
41	ProviderCloudflareWorkersAI  = "cloudflare-workers-ai"
42	ProviderCloudflareAIGateway  = "cloudflare-ai-gateway"
43)
44
45var builtinProviderIDs = []string{
46	ProviderAnthropic, ProviderOpenAI, ProviderOpenAICodex, ProviderOpenAIResponses,
47	ProviderKimi, ProviderDeepSeek, ProviderGoogle, ProviderOllama, ProviderLlamaCPP,
48	ProviderMoonshot, ProviderMoonshotCN, ProviderCerebras, ProviderGroq, ProviderXAI,
49	ProviderTogether, ProviderHuggingFace, ProviderOpenRouter, ProviderMistral,
50	ProviderZAI, ProviderXiaomi, ProviderXiaomiTokenPlanAMS, ProviderXiaomiTokenPlanCN,
51	ProviderXiaomiTokenPlanSGP, ProviderMiniMax, ProviderMiniMaxCN, ProviderFireworks,
52	ProviderVercelAIGateway, ProviderOpenCode, ProviderOpenCodeGo, ProviderAmazonBedrock,
53	ProviderGoogleVertex, ProviderAzureOpenAIResponses, ProviderGitHubCopilot,
54	ProviderCloudflareWorkersAI, ProviderCloudflareAIGateway,
55}
56
57func isBuiltinProviderID(id string) bool {
58	for _, p := range builtinProviderIDs {
59		if p == id {
60			return true
61		}
62	}
63	return false
64}
65
66// BuiltinProviderIDs returns the canonical built-in provider IDs in fallback
67// priority order. The returned slice is independent of package state.
68func BuiltinProviderIDs() []string {
69	return append([]string(nil), builtinProviderIDs...)
70}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 476

↑↓ moveenter openesc close