import Foundation public enum DoubaoProviderDescriptor { public static let descriptor: ProviderDescriptor = Self.makeDescriptor() static func makeDescriptor() -> ProviderDescriptor { ProviderDescriptor( id: .doubao, metadata: ProviderMetadata( id: .doubao, displayName: "Doubao", sessionLabel: "Requests", weeklyLabel: "Rate limit", opusLabel: nil, supportsOpus: false, supportsCredits: false, creditsHint: "", toggleTitle: "Show Doubao usage", cliName: "doubao", defaultEnabled: false, isPrimaryProvider: false, usesAccountFallback: false, browserCookieOrder: nil, dashboardURL: "https://console.volcengine.com/ark/region:ark+cn-beijing/openManagement?LLM=%7B%7D&advancedActiveKey=subscribe", statusPageURL: nil), branding: ProviderBranding( iconStyle: .doubao, iconResourceName: "ProviderIcon-doubao", color: ProviderColor(red: 51 / 255, green: 112 / 255, blue: 255 / 255)), tokenCost: ProviderTokenCostConfig( supportsTokenCost: false, noDataMessage: { "Doubao cost summary is not available." }), fetchPlan: .apiToken( strategyID: "doubao.api", resolveToken: { ProviderTokenResolver.doubaoToken(environment: $0) }, missingCredentialsError: { DoubaoUsageError.missingCredentials }, loadUsage: { apiKey, _ in try await DoubaoUsageFetcher.fetchUsage(apiKey: apiKey).toUsageSnapshot() }), cli: ProviderCLIConfig( name: "doubao", aliases: ["volcengine", "ark", "bytedance"], versionDetector: nil)) } }