Add upstream model list fetching and a Codex-specific model section
This commit is contained in:
1 parent
d759fe5e5d
commit
f3bf1472e7
12 files changed
+339
-16
No files matched your search
@@ -3,6 +3,7 @@ import type {
|
||||
ApplyResult,
|
||||
BackupInfo,
|
||||
LogEntry,
|
||||
ModelInfo,
|
||||
Models,
|
||||
Provider,
|
||||
Settings,
|
||||
@@ -73,6 +74,11 @@ export const api = {
|
||||
method: "POST",
|
||||
body: JSON.stringify(input),
|
||||
}),
|
||||
fetchModels: (input: { base_url: string; api_key: string }) =>
|
||||
request<{ items: ModelInfo[] }>("/api/fetch-models", {
|
||||
method: "POST",
|
||||
body: JSON.stringify(input),
|
||||
}),
|
||||
listBackups: (target: ApplyTarget = "claude") =>
|
||||
request<{ items: BackupInfo[] }>(`/api/backups?target=${target}`),
|
||||
getSettings: () => request<Settings>("/api/settings"),
|
||||
|
||||
@@ -76,6 +76,12 @@ export interface ApplyResult {
|
||||
injection?: Injection;
|
||||
}
|
||||
|
||||
export interface ModelInfo {
|
||||
id: string;
|
||||
object?: string;
|
||||
owned_by?: string;
|
||||
}
|
||||
|
||||
export interface Injection {
|
||||
model_provider: string;
|
||||
table: Record<string, string>;
|
||||
|
||||
Reference in new issue
Block a user