feat: support token auth profiles
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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(),
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user