feat: support token auth profiles

This commit is contained in:
Peter Steinberger
2026-01-09 07:51:47 +01:00
parent eced473e05
commit 37cbcc97d3
16 changed files with 388 additions and 113 deletions

View File

@@ -985,7 +985,13 @@ export type ModelsConfig = {
export type AuthProfileConfig = {
provider: string;
mode: "api_key" | "oauth";
/**
* Credential type expected in auth-profiles.json for this profile id.
* - api_key: static provider API key
* - oauth: refreshable OAuth credentials (access+refresh+expires)
* - token: static bearer-style token (optionally expiring; no refresh)
*/
mode: "api_key" | "oauth" | "token";
email?: string;
};

View File

@@ -895,7 +895,11 @@ export const ClawdbotSchema = z.object({
z.string(),
z.object({
provider: z.string(),
mode: z.union([z.literal("api_key"), z.literal("oauth")]),
mode: z.union([
z.literal("api_key"),
z.literal("oauth"),
z.literal("token"),
]),
email: z.string().optional(),
}),
)