diff --git a/bifrost/lib/clients/jawnTypes/public.ts b/bifrost/lib/clients/jawnTypes/public.ts index 2c358cab4c..829f779f83 100644 --- a/bifrost/lib/clients/jawnTypes/public.ts +++ b/bifrost/lib/clients/jawnTypes/public.ts @@ -385,18 +385,6 @@ export interface paths { "/v1/webhooks/{webhookId}/test": { post: operations["TestWebhook"]; }; - "/v1/public/waitlist/feature": { - post: operations["AddToWaitlist"]; - }; - "/v1/public/waitlist/feature/status": { - get: operations["IsOnWaitlist"]; - }; - "/v1/public/waitlist/feature/count": { - get: operations["GetWaitlistCount"]; - }; - "/v1/public/waitlist/feature/share": { - post: operations["TrackShare"]; - }; "/v1/vault/add": { post: operations["AddKey"]; }; @@ -436,48 +424,6 @@ export interface paths { "/v1/test/gateway-request": { post: operations["SendTestRequest"]; }; - "/v1/public/stats/model-usage": { - /** - * @description Get model usage statistics for the AI Gateway. - * Returns time series data and a leaderboard of top models by total tokens. - */ - get: operations["GetModelUsage"]; - }; - "/v1/public/stats/market-share": { - /** - * @description Get market share statistics by model author for the AI Gateway. - * Returns time series data (100% stacked) and a leaderboard of top 9 authors + others. - */ - get: operations["GetMarketShare"]; - }; - "/v1/public/stats/provider-usage": { - /** - * @description Get provider usage statistics for the AI Gateway. - * Returns time series data and a leaderboard of top 9 providers + others. - */ - get: operations["GetProviderUsage"]; - }; - "/v1/public/stats/authors/{author}": { - /** - * @description Get statistics for a specific model author. - * Returns time series data and a leaderboard of top models by that author. - */ - get: operations["GetAuthorStats"]; - }; - "/v1/public/stats/providers/{provider}": { - /** - * @description Get statistics for a specific inference provider. - * Returns time series data and a leaderboard of top models on that provider. - */ - get: operations["GetProviderStats"]; - }; - "/v1/public/stats/models/{model}": { - /** - * @description Get usage statistics for a specific model. - * Returns time series data showing token usage over time. - */ - get: operations["GetModelStats"]; - }; "/v1/session/query": { post: operations["GetSessions"]; }; @@ -555,19 +501,6 @@ export interface paths { "/v1/pi/costs-over-time/query": { post: operations["GetCostsOverTime"]; }; - "/v1/public/model-registry/models": { - /** - * Returns a comprehensive list of all AI models with their configurations, pricing, and capabilities - * @description Get all available models from the registry - */ - get: operations["GetModelRegistry"]; - }; - "/v1/models": { - get: operations["GetModels"]; - }; - "/v1/models/multimodal": { - get: operations["GetMultimodalModels"]; - }; "/v1/public/compare/models": { post: operations["GetModelComparison"]; }; @@ -631,9 +564,6 @@ export interface paths { "/v1/metrics/quantiles": { post: operations["GetQuantiles"]; }; - "/v1/public/security": { - post: operations["GetSecurity"]; - }; "/v1/helicone-sql/schema": { /** * Get database schema @@ -830,10 +760,6 @@ export interface paths { "/v1/credits/discounts": { get: operations["GetDiscounts"]; }; - "/v1/public/alert-banner": { - get: operations["GetAlertBanners"]; - patch: operations["UpdateAlertBannerActive"]; - }; "/v1/agent/generate": { post: operations["Generate"]; }; @@ -2473,46 +2399,6 @@ export interface components { error: null; }; "Result__success-boolean--message-string_.string_": components["schemas"]["ResultSuccess__success-boolean--message-string__"] | components["schemas"]["ResultError_string_"]; - "ResultSuccess__success-boolean--position_63_-number--alreadyOnList_63_-boolean--sharedPlatforms_63_-string-Array__": { - data: { - sharedPlatforms?: string[]; - alreadyOnList?: boolean; - /** Format: double */ - position?: number; - success: boolean; - }; - /** @enum {number|null} */ - error: null; - }; - "Result__success-boolean--position_63_-number--alreadyOnList_63_-boolean--sharedPlatforms_63_-string-Array_.string_": components["schemas"]["ResultSuccess__success-boolean--position_63_-number--alreadyOnList_63_-boolean--sharedPlatforms_63_-string-Array__"] | components["schemas"]["ResultError_string_"]; - "ResultSuccess__isOnWaitlist-boolean__": { - data: { - isOnWaitlist: boolean; - }; - /** @enum {number|null} */ - error: null; - }; - "Result__isOnWaitlist-boolean_.string_": components["schemas"]["ResultSuccess__isOnWaitlist-boolean__"] | components["schemas"]["ResultError_string_"]; - "ResultSuccess__count-number__": { - data: { - /** Format: double */ - count: number; - }; - /** @enum {number|null} */ - error: null; - }; - "Result__count-number_.string_": components["schemas"]["ResultSuccess__count-number__"] | components["schemas"]["ResultError_string_"]; - "ResultSuccess__success-boolean--newPosition_63_-number--message-string__": { - data: { - message: string; - /** Format: double */ - newPosition?: number; - success: boolean; - }; - /** @enum {number|null} */ - error: null; - }; - "Result__success-boolean--newPosition_63_-number--message-string_.string_": components["schemas"]["ResultSuccess__success-boolean--newPosition_63_-number--message-string__"] | components["schemas"]["ResultError_string_"]; AddVaultKeyParams: { key: string; provider: string; @@ -2756,142 +2642,6 @@ export interface components { SendTestRequestRequest: { apiKey: string; }; - ModelTokens: { - model: string; - /** Format: double */ - totalTokens: number; - }; - ModelUsageTimeSeriesDataPoint: { - time: string; - models: components["schemas"]["ModelTokens"][]; - }; - ModelUsageLeaderboardEntry: { - /** Format: double */ - rank: number; - model: string; - author: string; - /** Format: double */ - totalTokens: number; - /** Format: double */ - percentChange: number | null; - }; - ModelUsageResponse: { - timeSeries: components["schemas"]["ModelUsageTimeSeriesDataPoint"][]; - leaderboard: components["schemas"]["ModelUsageLeaderboardEntry"][]; - }; - ResultSuccess_ModelUsageResponse_: { - data: components["schemas"]["ModelUsageResponse"]; - /** @enum {number|null} */ - error: null; - }; - "Result_ModelUsageResponse.string_": components["schemas"]["ResultSuccess_ModelUsageResponse_"] | components["schemas"]["ResultError_string_"]; - /** @enum {string} */ - StatsTimeFrame: "24h" | "7d" | "30d" | "3m" | "1y"; - AuthorTokens: { - author: string; - /** Format: double */ - totalTokens: number; - /** Format: double */ - percentage: number; - }; - MarketShareTimeSeriesDataPoint: { - time: string; - authors: components["schemas"]["AuthorTokens"][]; - }; - MarketShareLeaderboardEntry: { - /** Format: double */ - rank: number; - author: string; - /** Format: double */ - totalTokens: number; - /** Format: double */ - marketShare: number; - /** Format: double */ - rankChange: number | null; - /** Format: double */ - marketShareChange: number | null; - }; - MarketShareResponse: { - timeSeries: components["schemas"]["MarketShareTimeSeriesDataPoint"][]; - leaderboard: components["schemas"]["MarketShareLeaderboardEntry"][]; - }; - ResultSuccess_MarketShareResponse_: { - data: components["schemas"]["MarketShareResponse"]; - /** @enum {number|null} */ - error: null; - }; - "Result_MarketShareResponse.string_": components["schemas"]["ResultSuccess_MarketShareResponse_"] | components["schemas"]["ResultError_string_"]; - ProviderTokens: { - provider: string; - /** Format: double */ - totalTokens: number; - }; - ProviderUsageTimeSeriesDataPoint: { - time: string; - providers: components["schemas"]["ProviderTokens"][]; - }; - ProviderUsageLeaderboardEntry: { - /** Format: double */ - rank: number; - provider: string; - /** Format: double */ - totalTokens: number; - /** Format: double */ - percentChange: number | null; - }; - ProviderUsageResponse: { - timeSeries: components["schemas"]["ProviderUsageTimeSeriesDataPoint"][]; - leaderboard: components["schemas"]["ProviderUsageLeaderboardEntry"][]; - }; - ResultSuccess_ProviderUsageResponse_: { - data: components["schemas"]["ProviderUsageResponse"]; - /** @enum {number|null} */ - error: null; - }; - "Result_ProviderUsageResponse.string_": components["schemas"]["ResultSuccess_ProviderUsageResponse_"] | components["schemas"]["ResultError_string_"]; - AuthorStatsResponse: { - author: string; - /** Format: double */ - totalTokens: number; - timeSeries: components["schemas"]["ModelUsageTimeSeriesDataPoint"][]; - leaderboard: components["schemas"]["ModelUsageLeaderboardEntry"][]; - }; - ResultSuccess_AuthorStatsResponse_: { - data: components["schemas"]["AuthorStatsResponse"]; - /** @enum {number|null} */ - error: null; - }; - "Result_AuthorStatsResponse.string_": components["schemas"]["ResultSuccess_AuthorStatsResponse_"] | components["schemas"]["ResultError_string_"]; - ProviderStatsResponse: { - provider: string; - /** Format: double */ - totalTokens: number; - timeSeries: components["schemas"]["ModelUsageTimeSeriesDataPoint"][]; - leaderboard: components["schemas"]["ModelUsageLeaderboardEntry"][]; - }; - ResultSuccess_ProviderStatsResponse_: { - data: components["schemas"]["ProviderStatsResponse"]; - /** @enum {number|null} */ - error: null; - }; - "Result_ProviderStatsResponse.string_": components["schemas"]["ResultSuccess_ProviderStatsResponse_"] | components["schemas"]["ResultError_string_"]; - ModelStatsTimeSeriesDataPoint: { - time: string; - /** Format: double */ - totalTokens: number; - }; - ModelStatsResponse: { - model: string; - /** Format: double */ - totalTokens: number; - timeSeries: components["schemas"]["ModelStatsTimeSeriesDataPoint"][]; - }; - ResultSuccess_ModelStatsResponse_: { - data: components["schemas"]["ModelStatsResponse"]; - /** @enum {number|null} */ - error: null; - }; - "Result_ModelStatsResponse.string_": components["schemas"]["ResultSuccess_ModelStatsResponse_"] | components["schemas"]["ResultError_string_"]; SessionResult: { created_at: string; latest_request_created_at: string; @@ -3701,238 +3451,6 @@ export interface components { error: null; }; "Result__cost-number--created_at_trunc-string_-Array.string_": components["schemas"]["ResultSuccess__cost-number--created_at_trunc-string_-Array_"] | components["schemas"]["ResultError_string_"]; - /** @enum {string} */ - AuthorName: "anthropic" | "deepseek" | "mistral" | "openai" | "perplexity" | "xai" | "google" | "meta-llama" | "amazon" | "microsoft" | "nvidia" | "qwen" | "moonshotai" | "alibaba" | "zai" | "baidu" | "passthrough"; - /** @enum {string} */ - StandardParameter: "max_tokens" | "max_completion_tokens" | "temperature" | "top_p" | "top_k" | "stop" | "stream" | "frequency_penalty" | "presence_penalty" | "repetition_penalty" | "seed" | "tools" | "tool_choice" | "functions" | "function_call" | "reasoning" | "include_reasoning" | "thinking" | "response_format" | "json_mode" | "truncate" | "min_p" | "logit_bias" | "logprobs" | "top_logprobs" | "structured_outputs" | "verbosity" | "n"; - /** @enum {string} */ - PluginId: "web"; - RateLimits: { - /** Format: double */ - rpm?: number; - /** Format: double */ - tpm?: number; - /** Format: double */ - tpd?: number; - }; - /** - * @description Per-modality pricing configuration. - * Supports input, cached input (as multiplier), and output rates. - */ - ModalityPricing: { - /** Format: double */ - input?: number; - /** Format: double */ - cachedInputMultiplier?: number; - /** Format: double */ - output?: number; - }; - ModelPricing: { - /** Format: double */ - threshold: number; - /** Format: double */ - input: number; - /** Format: double */ - output: number; - cacheMultipliers?: { - /** Format: double */ - write1h?: number; - /** Format: double */ - write5m?: number; - /** Format: double */ - cachedInput: number; - }; - /** Format: double */ - cacheStoragePerHour?: number; - /** Format: double */ - thinking?: number; - /** Format: double */ - request?: number; - image?: components["schemas"]["ModalityPricing"]; - audio?: components["schemas"]["ModalityPricing"]; - video?: components["schemas"]["ModalityPricing"]; - file?: components["schemas"]["ModalityPricing"]; - /** Format: double */ - web_search?: number; - }; - /** @enum {string} */ - BodyMappingType: "OPENAI" | "NO_MAPPING" | "RESPONSES"; - EndpointConfig: { - region?: string; - location?: string; - projectId?: string; - baseUri?: string; - deploymentName?: string; - resourceName?: string; - apiVersion?: string; - crossRegion?: boolean; - gatewayMapping?: components["schemas"]["BodyMappingType"]; - modelName?: string; - heliconeModelId?: string; - providerModelId?: string; - pricing?: components["schemas"]["ModelPricing"][]; - /** Format: double */ - contextLength?: number; - /** Format: double */ - maxCompletionTokens?: number; - ptbEnabled?: boolean; - version?: string; - rateLimits?: components["schemas"]["RateLimits"]; - /** Format: double */ - priority?: number; - }; - /** @description Construct a type with a set of properties K of type T */ - "Record_string.EndpointConfig_": { - [key: string]: components["schemas"]["EndpointConfig"]; - }; - /** @enum {string} */ - ResponseFormat: "ANTHROPIC" | "OPENAI" | "GOOGLE"; - ModelProviderConfig: { - pricing: components["schemas"]["ModelPricing"][]; - /** Format: double */ - contextLength: number; - /** Format: double */ - maxCompletionTokens: number; - ptbEnabled: boolean; - version?: string; - unsupportedParameters?: components["schemas"]["StandardParameter"][]; - providerModelId: string; - provider: components["schemas"]["ModelProviderName"]; - author: components["schemas"]["AuthorName"]; - supportedParameters: components["schemas"]["StandardParameter"][]; - supportedPlugins?: components["schemas"]["PluginId"][]; - rateLimits?: components["schemas"]["RateLimits"]; - endpointConfigs: components["schemas"]["Record_string.EndpointConfig_"]; - crossRegion?: boolean; - /** Format: double */ - priority?: number; - /** @enum {string} */ - quantization?: "fp4" | "fp8" | "fp16" | "bf16" | "int4"; - responseFormat?: components["schemas"]["ResponseFormat"]; - requireExplicitRouting?: boolean; - providerModelIdAliases?: string[]; - }; - UserEndpointConfig: { - region?: string; - location?: string; - projectId?: string; - baseUri?: string; - deploymentName?: string; - resourceName?: string; - apiVersion?: string; - crossRegion?: boolean; - gatewayMapping?: components["schemas"]["BodyMappingType"]; - modelName?: string; - heliconeModelId?: string; - }; - Endpoint: { - pricing: components["schemas"]["ModelPricing"][]; - /** Format: double */ - contextLength: number; - /** Format: double */ - maxCompletionTokens: number; - ptbEnabled: boolean; - version?: string; - unsupportedParameters?: components["schemas"]["StandardParameter"][]; - modelConfig: components["schemas"]["ModelProviderConfig"]; - userConfig: components["schemas"]["UserEndpointConfig"]; - provider: components["schemas"]["ModelProviderName"]; - author: components["schemas"]["AuthorName"]; - providerModelId: string; - supportedParameters: components["schemas"]["StandardParameter"][]; - /** Format: double */ - priority?: number; - }; - SimplifiedModalityPricing: { - /** Format: double */ - input?: number; - /** Format: double */ - cachedInput?: number; - /** Format: double */ - output?: number; - }; - SimplifiedPricing: { - /** Format: double */ - prompt: number; - /** Format: double */ - completion: number; - audio?: components["schemas"]["SimplifiedModalityPricing"]; - /** Format: double */ - thinking?: number; - /** Format: double */ - web_search?: number; - image?: components["schemas"]["SimplifiedModalityPricing"]; - video?: components["schemas"]["SimplifiedModalityPricing"]; - file?: components["schemas"]["SimplifiedModalityPricing"]; - /** Format: double */ - cacheRead?: number; - /** Format: double */ - cacheWrite?: number; - /** Format: double */ - threshold?: number; - }; - ModelEndpoint: { - provider: string; - providerSlug: string; - endpoint?: components["schemas"]["Endpoint"]; - supportsPtb?: boolean; - pricing: components["schemas"]["SimplifiedPricing"]; - pricingTiers?: components["schemas"]["SimplifiedPricing"][]; - }; - /** @enum {string} */ - InputModality: "text" | "image" | "audio" | "video"; - /** @enum {string} */ - OutputModality: "text" | "image" | "audio" | "video"; - ModelRegistryItem: { - id: string; - name: string; - author: string; - /** Format: double */ - contextLength: number; - endpoints: components["schemas"]["ModelEndpoint"][]; - /** Format: double */ - maxOutput?: number; - trainingDate?: string; - description?: string; - inputModalities: components["schemas"]["InputModality"][]; - outputModalities: components["schemas"]["OutputModality"][]; - supportedParameters: components["schemas"]["StandardParameter"][]; - pinnedVersionOfModel?: string; - }; - /** @enum {string} */ - ModelCapability: "audio" | "video" | "image" | "thinking" | "web_search" | "caching" | "reasoning"; - ModelRegistryResponse: { - models: components["schemas"]["ModelRegistryItem"][]; - /** Format: double */ - total: number; - filters: { - capabilities: components["schemas"]["ModelCapability"][]; - authors: string[]; - providers: { - displayName: string; - name: string; - }[]; - }; - }; - ResultSuccess_ModelRegistryResponse_: { - data: components["schemas"]["ModelRegistryResponse"]; - /** @enum {number|null} */ - error: null; - }; - "Result_ModelRegistryResponse.string_": components["schemas"]["ResultSuccess_ModelRegistryResponse_"] | components["schemas"]["ResultError_string_"]; - OAIModel: { - id: string; - /** @enum {string} */ - object: "model"; - /** Format: double */ - created: number; - owned_by: string; - }; - OAIModelsResponse: { - /** @enum {string} */ - object: "list"; - data: components["schemas"]["OAIModel"][]; - }; MetricStats: { /** Format: double */ p99: number; @@ -4225,14 +3743,6 @@ export interface components { timeZoneDifference: number; metric: string; }; - "ResultSuccess__unsafe-boolean__": { - data: { - unsafe: boolean; - }; - /** @enum {number|null} */ - error: null; - }; - "Result__unsafe-boolean_.string_": components["schemas"]["ResultSuccess__unsafe-boolean__"] | components["schemas"]["ResultError_string_"]; ClickHouseTableColumn: { name: string; type: string; @@ -4842,20 +4352,6 @@ export interface components { error: null; }; "Result_OrgDiscount-Array.string_": components["schemas"]["ResultSuccess_OrgDiscount-Array_"] | components["schemas"]["ResultError_string_"]; - "ResultSuccess__id-number--active-boolean--title-string--message-string--created_at-string--updated_at-string_-Array_": { - data: { - updated_at: string; - created_at: string; - message: string; - title: string; - active: boolean; - /** Format: double */ - id: number; - }[]; - /** @enum {number|null} */ - error: null; - }; - "Result__id-number--active-boolean--title-string--message-string--created_at-string--updated_at-string_-Array.string_": components["schemas"]["ResultSuccess__id-number--active-boolean--title-string--message-string--created_at-string--updated_at-string_-Array_"] | components["schemas"]["ResultError_string_"]; InAppThread: { id: string; chat: unknown; @@ -7134,75 +6630,6 @@ export interface operations { }; }; }; - AddToWaitlist: { - requestBody: { - content: { - "application/json": { - feature: string; - email: string; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__success-boolean--position_63_-number--alreadyOnList_63_-boolean--sharedPlatforms_63_-string-Array_.string_"]; - }; - }; - }; - }; - IsOnWaitlist: { - parameters: { - query: { - email: string; - feature: string; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__isOnWaitlist-boolean_.string_"]; - }; - }; - }; - }; - GetWaitlistCount: { - parameters: { - query: { - feature: string; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__count-number_.string_"]; - }; - }; - }; - }; - TrackShare: { - requestBody: { - content: { - "application/json": { - /** @enum {string} */ - platform: "twitter" | "linkedin"; - feature: string; - email: string; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__success-boolean--newPosition_63_-number--message-string_.string_"]; - }; - }; - }; - }; AddKey: { requestBody: { content: { @@ -7398,138 +6825,6 @@ export interface operations { }; }; }; - /** - * @description Get model usage statistics for the AI Gateway. - * Returns time series data and a leaderboard of top models by total tokens. - */ - GetModelUsage: { - parameters: { - query?: { - /** @description Time range: "24h", "7d", "30d", "3m", or "1y" */ - timeframe?: components["schemas"]["StatsTimeFrame"]; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_ModelUsageResponse.string_"]; - }; - }; - }; - }; - /** - * @description Get market share statistics by model author for the AI Gateway. - * Returns time series data (100% stacked) and a leaderboard of top 9 authors + others. - */ - GetMarketShare: { - parameters: { - query?: { - /** @description Time range: "24h", "7d", "30d", "3m", or "1y" */ - timeframe?: components["schemas"]["StatsTimeFrame"]; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_MarketShareResponse.string_"]; - }; - }; - }; - }; - /** - * @description Get provider usage statistics for the AI Gateway. - * Returns time series data and a leaderboard of top 9 providers + others. - */ - GetProviderUsage: { - parameters: { - query?: { - /** @description Time range: "24h", "7d", "30d", "3m", or "1y" */ - timeframe?: components["schemas"]["StatsTimeFrame"]; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_ProviderUsageResponse.string_"]; - }; - }; - }; - }; - /** - * @description Get statistics for a specific model author. - * Returns time series data and a leaderboard of top models by that author. - */ - GetAuthorStats: { - parameters: { - query?: { - /** @description Time range: "24h", "7d", "30d", "3m", or "1y" */ - timeframe?: components["schemas"]["StatsTimeFrame"]; - }; - path: { - /** @description The author identifier (e.g., "openai", "anthropic") */ - author: string; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_AuthorStatsResponse.string_"]; - }; - }; - }; - }; - /** - * @description Get statistics for a specific inference provider. - * Returns time series data and a leaderboard of top models on that provider. - */ - GetProviderStats: { - parameters: { - query?: { - /** @description Time range: "24h", "7d", "30d", "3m", or "1y" */ - timeframe?: components["schemas"]["StatsTimeFrame"]; - }; - path: { - /** @description The provider identifier (e.g., "openai", "anthropic") */ - provider: string; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_ProviderStatsResponse.string_"]; - }; - }; - }; - }; - /** - * @description Get usage statistics for a specific model. - * Returns time series data showing token usage over time. - */ - GetModelStats: { - parameters: { - query?: { - /** @description Time range: "24h", "7d", "30d", "3m", or "1y" */ - timeframe?: components["schemas"]["StatsTimeFrame"]; - }; - path: { - /** @description The model identifier (e.g., "gpt-4", "claude-3-opus") */ - model: string; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_ModelStatsResponse.string_"]; - }; - }; - }; - }; GetSessions: { requestBody: { content: { @@ -7967,40 +7262,6 @@ export interface operations { }; }; }; - /** - * Returns a comprehensive list of all AI models with their configurations, pricing, and capabilities - * @description Get all available models from the registry - */ - GetModelRegistry: { - responses: { - /** @description Complete model registry with models and filter options */ - 200: { - content: { - "application/json": components["schemas"]["Result_ModelRegistryResponse.string_"]; - }; - }; - }; - }; - GetModels: { - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["OAIModelsResponse"]; - }; - }; - }; - }; - GetMultimodalModels: { - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["OAIModelsResponse"]; - }; - }; - }; - }; GetModelComparison: { requestBody: { content: { @@ -8301,24 +7562,6 @@ export interface operations { }; }; }; - GetSecurity: { - requestBody: { - content: { - "application/json": { - text: string; - advanced: boolean; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__unsafe-boolean_.string_"]; - }; - }; - }; - }; /** * Get database schema * @description Get ClickHouse schema (tables and columns) @@ -9302,35 +8545,6 @@ export interface operations { }; }; }; - GetAlertBanners: { - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__id-number--active-boolean--title-string--message-string--created_at-string--updated_at-string_-Array.string_"]; - }; - }; - }; - }; - UpdateAlertBannerActive: { - requestBody: { - content: { - "application/json": { - active: boolean; - /** Format: double */ - id: number; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_void.string_"]; - }; - }; - }; - }; UpsertThreadMessage: { parameters: { path: { diff --git a/valhalla/jawn/src/controllers/public/alertBannerController.ts b/valhalla/jawn/src/controllers/public/alertBannerController.ts deleted file mode 100644 index af5c180207..0000000000 --- a/valhalla/jawn/src/controllers/public/alertBannerController.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { Body, Controller, Get, Patch, Request, Route, Tags } from "tsoa"; -import { type JawnAuthenticatedRequest } from "../../types/request"; -import { dbExecute } from "../../lib/shared/db/dbExecute"; -import { err, ok, Result } from "../../packages/common/result"; - -@Route("v1/public/alert-banner") -@Tags("AdminAlertBanner") -export class AlertBannerController extends Controller { - @Patch("/") - public async updateAlertBannerActive( - @Request() request: JawnAuthenticatedRequest, - @Body() - body: { - id: number; - active: boolean; - } - ): Promise> { - if ( - request.headers.authorization !== process.env.HELICONE_MANUAL_ACCESS_KEY - ) { - this.setStatus(401); - return err("Unauthorized"); - } - - const { error } = await dbExecute( - ` - UPDATE alert_banners SET active = $1 WHERE id = $2 - `, - [body.active, body.id] - ); - - if (error) { - this.setStatus(500); - return err("Unable to update alert banner"); - } - - this.setStatus(200); - return ok(undefined); - } - - @Get("/") - public async getAlertBanners( - @Request() request: JawnAuthenticatedRequest - ): Promise< - Result< - { - id: number; - active: boolean; - title: string; - message: string; - created_at: string; - updated_at: string; - }[], - string - > - > { - if ( - request.headers.authorization !== process.env.HELICONE_MANUAL_ACCESS_KEY - ) { - this.setStatus(401); - return err("Unauthorized"); - } - const { error, data } = await dbExecute( - `SELECT * FROM alert_banners ORDER BY created_at ASC`, - [] - ); - - if (error) { - return err("Unable to get alert banners"); - } - - this.setStatus(200); - return ok( - data as { - id: number; - active: boolean; - title: string; - message: string; - created_at: string; - updated_at: string; - }[] - ); - } -} diff --git a/valhalla/jawn/src/controllers/public/llmSecurityController.ts b/valhalla/jawn/src/controllers/public/llmSecurityController.ts deleted file mode 100644 index d777c923d6..0000000000 --- a/valhalla/jawn/src/controllers/public/llmSecurityController.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { Body, Controller, Post, Request, Route, Tags } from "tsoa"; -import { GET_KEY } from "../../lib/clients/constant"; -import { Result, err, ok } from "../../packages/common/result"; -import { type JawnAuthenticatedRequest } from "../../types/request"; - -async function checkLLMGuard(text: string): Promise<{ - unsafe: boolean; -}> { - const apiKey = await GET_KEY("key:together_ai"); - if (!apiKey.data) { - console.error("No API key found"); - return { - unsafe: false, - }; - } - const headers = { - Authorization: `Bearer ${apiKey.data}`, - "Content-Type": "application/json", - }; - - const data = { - model: "meta-llama/Meta-Llama-Guard-3-8B", - messages: [{ role: "user", content: text }], - temperature: 1.0, - }; - - try { - const response = await fetch( - "https://api.together.xyz/v1/chat/completions", - { - method: "POST", - headers, - body: JSON.stringify(data), - } - ); - - if (!response.ok) { - throw new Error(`API request failed: ${response.statusText}`); - } - - const result = await response.json(); - const responseText = result.choices[0].message.content.toLowerCase(); - - // Parse response - if it contains "unsafe" and is short, consider it unsafe - if (responseText.includes("unsafe") && responseText.length < 10) { - return { - unsafe: true, - }; - } else { - return { - unsafe: false, - }; - } - } catch (error) { - console.error("Error calling Together AI API:", error); - - return { - unsafe: false, - }; - } -} - -@Route("/v1/public/security") // Route is defined here -@Tags("Security") -export class LLMSecurityController extends Controller { - @Post("/") - public async getSecurity( - @Body() - body: { - advanced: boolean; - text: string; - }, - @Request() request: JawnAuthenticatedRequest - ): Promise> { - if ( - request.headers.authorization !== process.env.HELICONE_MANUAL_ACCESS_KEY - ) { - this.setStatus(401); - return err("Unauthorized"); - } - - try { - const response = await fetch(`http://127.0.0.1:9001/check_security`, { - method: "POST", - body: JSON.stringify({ - text: body.text, - temperature: 1.0, - }), - headers: { - "Content-Type": "application/json", - }, - }); - - if (!response.ok) { - console.error(response); - this.setStatus(response.status); - return err(response.statusText); - } - - const result = await response.json(); - - if (result.jailbreak_score > 0.7) { - return ok({ - unsafe: true, - }); - } - - if (body.advanced) { - const togetherResponse = await checkLLMGuard(body.text); - if (togetherResponse.unsafe) { - return ok({ - unsafe: true, - }); - } - } - - return ok({ - unsafe: false, - }); - } catch (error) { - this.setStatus(500); - return err(error instanceof Error ? error.message : "Unknown error"); - } - } -} diff --git a/valhalla/jawn/src/controllers/public/modelController.ts b/valhalla/jawn/src/controllers/public/modelController.ts deleted file mode 100644 index 70b129b7e5..0000000000 --- a/valhalla/jawn/src/controllers/public/modelController.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { Controller, Get, Route, Tags } from "tsoa"; -import { registry } from "../../../../../packages/cost/models/registry"; - -interface OAIModel { - id: string; - object: "model"; - created: number; - owned_by: string; -} - -interface OAIModelsResponse { - object: "list"; - data: OAIModel[]; -} - -@Route("/v1/models") -@Tags("Models") -export class ModelController extends Controller { - private dateToUnixTimestamp(dateString?: string): number { - if (!dateString) { - return Math.floor(new Date("2024-01-01").getTime() / 1000); - } - return Math.floor(new Date(dateString).getTime() / 1000); - } - - @Get("/") - public async getModels(): Promise { - try { - const allModelsResult = registry.getAllModelsWithIds(); - if (allModelsResult.error) { - this.setStatus(500); - throw new Error("Failed to fetch models from registry"); - } - - const oaiModels: OAIModel[] = []; - - for (const [modelId, modelConfig] of Object.entries( - allModelsResult.data! - )) { - const endpointsResult = registry.getEndpointsByModel(modelId); - if ( - !endpointsResult.data || - endpointsResult.data.length === 0 || - endpointsResult.error - ) { - continue; - } - - const allEndpointsRequireExplicitRouting = endpointsResult.data.every( - (ep) => ep.modelConfig.requireExplicitRouting === true - ); - if (allEndpointsRequireExplicitRouting) { - continue; - } - - oaiModels.push({ - id: modelId, - object: "model", - created: this.dateToUnixTimestamp(modelConfig.created), - owned_by: modelConfig.author, - }); - } - - this.setStatus(200); - return { - object: "list", - data: oaiModels, - }; - } catch (error) { - console.error("Error fetching models:", error); - this.setStatus(500); - throw new Error("Internal server error while fetching models"); - } - } - - @Get("/multimodal") - public async getMultimodalModels(): Promise { - try { - const allModelsResult = registry.getAllModelsWithIds(); - if (allModelsResult.error) { - this.setStatus(500); - throw new Error("Failed to fetch models from registry"); - } - - const oaiModels: OAIModel[] = []; - - for (const [modelId, modelConfig] of Object.entries( - allModelsResult.data! - )) { - // Filter for multimodal models: more than one input OR more than one output - const isMultimodal = - modelConfig.modality.inputs.length > 1 || - modelConfig.modality.outputs.length > 1; - - if (!isMultimodal) { - continue; - } - - const endpointsResult = registry.getEndpointsByModel(modelId); - if ( - !endpointsResult.data || - endpointsResult.data.length === 0 || - endpointsResult.error - ) { - continue; - } - - const allEndpointsRequireExplicitRouting = endpointsResult.data.every( - (ep) => ep.modelConfig.requireExplicitRouting === true - ); - if (allEndpointsRequireExplicitRouting) { - continue; - } - - oaiModels.push({ - id: modelId, - object: "model", - created: this.dateToUnixTimestamp(modelConfig.created), - owned_by: modelConfig.author, - }); - } - - this.setStatus(200); - return { - object: "list", - data: oaiModels, - }; - } catch (error) { - console.error("Error fetching multimodal models:", error); - this.setStatus(500); - throw new Error("Internal server error while fetching multimodal models"); - } - } -} diff --git a/valhalla/jawn/src/controllers/public/modelRegistryController.ts b/valhalla/jawn/src/controllers/public/modelRegistryController.ts deleted file mode 100644 index 6c1ee2f482..0000000000 --- a/valhalla/jawn/src/controllers/public/modelRegistryController.ts +++ /dev/null @@ -1,449 +0,0 @@ -import { Controller, Get, Route, Tags, Example } from "tsoa"; -import { err, ok, Result } from "../../packages/common/result"; -import { registry } from "../../../../../packages/cost/models/registry"; -import { getProviderDisplayName } from "../../../../../packages/cost/models/provider-helpers"; -import { - InputModality, - OutputModality, - StandardParameter, - Endpoint, -} from "../../../../../packages/cost/models/types"; - -type ModelCapability = - | "audio" - | "video" - | "image" - | "thinking" - | "web_search" - | "caching" - | "reasoning"; - -interface SimplifiedModalityPricing { - input?: number; - cachedInput?: number; - output?: number; -} - -interface SimplifiedPricing { - prompt: number; - completion: number; - audio?: SimplifiedModalityPricing; - thinking?: number; - web_search?: number; - image?: SimplifiedModalityPricing; - video?: SimplifiedModalityPricing; - file?: SimplifiedModalityPricing; - cacheRead?: number; - cacheWrite?: number; - threshold?: number; -} - -interface ModelEndpoint { - provider: string; - providerSlug: string; - endpoint?: Endpoint; - supportsPtb?: boolean; - pricing: SimplifiedPricing; - pricingTiers?: SimplifiedPricing[]; -} - -interface ModelRegistryItem { - id: string; - name: string; - author: string; - contextLength: number; - endpoints: ModelEndpoint[]; - maxOutput?: number; - trainingDate?: string; - description?: string; - inputModalities: InputModality[]; - outputModalities: OutputModality[]; - supportedParameters: StandardParameter[]; - pinnedVersionOfModel?: string; -} - -interface ModelRegistryResponse { - models: ModelRegistryItem[]; - total: number; - filters: { - providers: Array<{ - name: string; - displayName: string; - }>; - authors: string[]; - capabilities: ModelCapability[]; - }; -} - -@Route("/v1/public/model-registry") -@Tags("Model Registry") -export class ModelRegistryController extends Controller { - private getProviderSlug(provider: string): string { - const slugMap: Record = { - openai: "openai", - anthropic: "anthropic", - google: "google", - vertex: "google-vertex", - bedrock: "aws-bedrock", - azure: "azure", - }; - return slugMap[provider.toLowerCase()] || provider.toLowerCase(); - } - - /** - * Get all available models from the registry - * @summary Returns a comprehensive list of all AI models with their configurations, pricing, and capabilities - * @description This endpoint provides detailed information about all available models including: - * - Model metadata (name, author, context length, training date) - * - Supported providers and endpoints - * - Pricing information (per million tokens for prompt/completion/special features) - * - Input/output modalities (text, image, audio, video) - * - Supported parameters (temperature, max_tokens, etc.) - * - Available capabilities (audio, video, image, thinking, web_search, caching) - * - * No authentication required - this is a public endpoint. - * - * @returns {ModelRegistryResponse} Complete model registry with models and filter options - */ - @Get("/models") - @Example({ - models: [ - { - id: "claude-opus-4-1", - name: "Anthropic: Claude Opus 4.1", - author: "anthropic", - contextLength: 200000, - endpoints: [ - { - provider: "anthropic", - providerSlug: "anthropic", - supportsPtb: true, - pricing: { - prompt: 15, - completion: 75, - cacheRead: 1.5, - cacheWrite: 18.75, - }, - }, - ], - maxOutput: 32000, - trainingDate: "2025-08-05", - description: "Most capable Claude model with extended context", - inputModalities: ["text" as InputModality], - outputModalities: ["text" as OutputModality], - supportedParameters: [ - "max_tokens" as StandardParameter, - "temperature" as StandardParameter, - "stop" as StandardParameter, - "reasoning" as StandardParameter, - "include_reasoning" as StandardParameter, - "tools" as StandardParameter, - "tool_choice" as StandardParameter, - ], - }, - ], - total: 150, - filters: { - providers: [ - { name: "anthropic", displayName: "Anthropic" }, - { name: "openai", displayName: "OpenAI" }, - { name: "google", displayName: "Google" }, - ], - authors: ["anthropic", "openai", "google", "meta"], - capabilities: ["audio", "image", "thinking", "caching", "reasoning"], - }, - }) - public async getModelRegistry(): Promise< - Result - > { - try { - const allModelsResult = registry.getAllModelsWithIds(); - if (allModelsResult.error) { - this.setStatus(500); - return err("Failed to fetch models from registry"); - } - - const models: ModelRegistryItem[] = []; - - for (const [modelId, modelConfig] of Object.entries( - allModelsResult.data! - )) { - const providerConfigsResult = registry.getModelProviderConfigs(modelId); - if (providerConfigsResult.error || !providerConfigsResult.data) { - continue; - } - - const endpoints: ModelEndpoint[] = []; - - const allEndpointsResult = registry.getEndpointsByModel(modelId); - - if (allEndpointsResult.data && allEndpointsResult.data.length > 0) { - for (const endpoint of allEndpointsResult.data) { - const baseTier = endpoint.pricing[0]; - const simplifiedPricing: SimplifiedPricing = { - prompt: baseTier.input * 1000000, - completion: baseTier.output * 1000000, - audio: baseTier.audio - ? { - input: baseTier.audio.input - ? baseTier.audio.input * 1000000 - : undefined, - cachedInput: - baseTier.audio.input && - baseTier.audio.cachedInputMultiplier - ? baseTier.audio.input * - baseTier.audio.cachedInputMultiplier * - 1000000 - : undefined, - output: baseTier.audio.output - ? baseTier.audio.output * 1000000 - : undefined, - } - : undefined, - thinking: baseTier.thinking - ? baseTier.thinking * 1000000 - : undefined, - web_search: baseTier.web_search - ? baseTier.web_search * 1000000 - : undefined, - image: baseTier.image - ? { - input: baseTier.image.input - ? baseTier.image.input * 1000000 - : undefined, - cachedInput: - baseTier.image.input && - baseTier.image.cachedInputMultiplier - ? baseTier.image.input * - baseTier.image.cachedInputMultiplier * - 1000000 - : undefined, - output: baseTier.image.output - ? baseTier.image.output * 1000000 - : undefined, - } - : undefined, - video: baseTier.video - ? { - input: baseTier.video.input - ? baseTier.video.input * 1000000 - : undefined, - cachedInput: - baseTier.video.input && - baseTier.video.cachedInputMultiplier - ? baseTier.video.input * - baseTier.video.cachedInputMultiplier * - 1000000 - : undefined, - output: baseTier.video.output - ? baseTier.video.output * 1000000 - : undefined, - } - : undefined, - file: baseTier.file - ? { - input: baseTier.file.input - ? baseTier.file.input * 1000000 - : undefined, - cachedInput: - baseTier.file.input && baseTier.file.cachedInputMultiplier - ? baseTier.file.input * - baseTier.file.cachedInputMultiplier * - 1000000 - : undefined, - output: baseTier.file.output - ? baseTier.file.output * 1000000 - : undefined, - } - : undefined, - cacheRead: baseTier.cacheMultipliers?.cachedInput - ? baseTier.input * - baseTier.cacheMultipliers.cachedInput * - 1000000 - : undefined, - cacheWrite: baseTier.cacheMultipliers?.write5m - ? baseTier.input * baseTier.cacheMultipliers.write5m * 1000000 - : undefined, - }; - - let pricingTiers: SimplifiedPricing[] | undefined; - if (endpoint.pricing.length > 1) { - pricingTiers = endpoint.pricing.map((tier) => ({ - prompt: tier.input * 1000000, - completion: tier.output * 1000000, - audio: tier.audio - ? { - input: tier.audio.input - ? tier.audio.input * 1000000 - : undefined, - cachedInput: - tier.audio.input && tier.audio.cachedInputMultiplier - ? tier.audio.input * - tier.audio.cachedInputMultiplier * - 1000000 - : undefined, - output: tier.audio.output - ? tier.audio.output * 1000000 - : undefined, - } - : undefined, - thinking: tier.thinking ? tier.thinking * 1000000 : undefined, - web_search: tier.web_search - ? tier.web_search * 1000000 - : undefined, - image: tier.image - ? { - input: tier.image.input - ? tier.image.input * 1000000 - : undefined, - cachedInput: - tier.image.input && tier.image.cachedInputMultiplier - ? tier.image.input * - tier.image.cachedInputMultiplier * - 1000000 - : undefined, - output: tier.image.output - ? tier.image.output * 1000000 - : undefined, - } - : undefined, - video: tier.video - ? { - input: tier.video.input - ? tier.video.input * 1000000 - : undefined, - cachedInput: - tier.video.input && tier.video.cachedInputMultiplier - ? tier.video.input * - tier.video.cachedInputMultiplier * - 1000000 - : undefined, - output: tier.video.output - ? tier.video.output * 1000000 - : undefined, - } - : undefined, - file: tier.file - ? { - input: tier.file.input - ? tier.file.input * 1000000 - : undefined, - cachedInput: - tier.file.input && tier.file.cachedInputMultiplier - ? tier.file.input * - tier.file.cachedInputMultiplier * - 1000000 - : undefined, - output: tier.file.output - ? tier.file.output * 1000000 - : undefined, - } - : undefined, - cacheRead: tier.cacheMultipliers?.cachedInput - ? tier.input * tier.cacheMultipliers.cachedInput * 1000000 - : undefined, - cacheWrite: tier.cacheMultipliers?.write5m - ? tier.input * tier.cacheMultipliers.write5m * 1000000 - : undefined, - threshold: tier.threshold, - })); - } - - endpoints.push({ - provider: endpoint.provider, - providerSlug: this.getProviderSlug(endpoint.provider), - endpoint: endpoint, - supportsPtb: endpoint.ptbEnabled, - pricing: simplifiedPricing, - pricingTiers: pricingTiers, - }); - } - } - - if (endpoints.length === 0) { - continue; - } - - const allEndpointsRequireExplicitRouting = endpoints.every( - (ep) => ep.endpoint?.modelConfig.requireExplicitRouting === true - ); - - if (allEndpointsRequireExplicitRouting) { - continue; - } - - const structuredModality = modelConfig.modality; - - const allSupportedParameters = new Set(); - for (const config of providerConfigsResult.data) { - config.supportedParameters.forEach((param) => - allSupportedParameters.add(param) - ); - } - - models.push({ - id: modelId, - name: modelConfig.name, - author: modelConfig.author, - contextLength: modelConfig.contextLength, - endpoints, - maxOutput: modelConfig.maxOutputTokens, - trainingDate: modelConfig.created, - description: modelConfig.description, - inputModalities: structuredModality.inputs, - outputModalities: structuredModality.outputs, - supportedParameters: Array.from(allSupportedParameters), - pinnedVersionOfModel: modelConfig.pinnedVersionOfModel, - }); - } - - const availableProviders = new Set(); - const availableAuthors = new Set(); - const availableCapabilities = new Set(); - - models.forEach((model) => { - availableAuthors.add(model.author); - model.endpoints.forEach((ep) => { - availableProviders.add(ep.provider); - if (ep.pricing.audio?.input || ep.pricing.audio?.output) - availableCapabilities.add("audio"); - if (ep.pricing.video?.input || ep.pricing.video?.output) - availableCapabilities.add("video"); - if (ep.pricing.image?.input || ep.pricing.image?.output) - availableCapabilities.add("image"); - if (ep.pricing.thinking && ep.pricing.thinking > 0) - availableCapabilities.add("thinking"); - if (ep.pricing.web_search && ep.pricing.web_search > 0) - availableCapabilities.add("web_search"); - if ( - (ep.pricing.cacheRead && ep.pricing.cacheRead > 0) || - (ep.pricing.cacheWrite && ep.pricing.cacheWrite > 0) - ) { - availableCapabilities.add("caching"); - } - }); - }); - const providersWithDisplayNames = Array.from(availableProviders) - .sort() - .map((provider) => ({ - name: provider, - displayName: getProviderDisplayName(provider), - })); - - this.setStatus(200); - return ok({ - models, - total: models.length, - filters: { - providers: providersWithDisplayNames, - authors: Array.from(availableAuthors).sort(), - capabilities: Array.from(availableCapabilities).sort(), - }, - }); - } catch (error) { - console.error("Error fetching model registry:", error); - this.setStatus(500); - return err("Internal server error while fetching model registry"); - } - } -} diff --git a/valhalla/jawn/src/controllers/public/statsController.ts b/valhalla/jawn/src/controllers/public/statsController.ts deleted file mode 100644 index a9cf08a6f0..0000000000 --- a/valhalla/jawn/src/controllers/public/statsController.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { Controller, Get, Path, Query, Route, Tags } from "tsoa"; -import { Result } from "../../packages/common/result"; -import { - AuthorStatsResponse, - MarketShareResponse, - ModelStatsResponse, - ModelUsageResponse, - ModelUsageStatsManager, - ProviderStatsResponse, - ProviderUsageResponse, -} from "../../managers/ModelUsageStatsManager"; - -export type StatsTimeFrame = "24h" | "7d" | "30d" | "3m" | "1y"; - -@Route("/v1/public/stats") -@Tags("Stats") -export class StatsController extends Controller { - /** - * Get model usage statistics for the AI Gateway. - * Returns time series data and a leaderboard of top models by total tokens. - * - * @param timeframe Time range: "24h", "7d", "30d", "3m", or "1y" - */ - @Get("/model-usage") - public async getModelUsage( - @Query() timeframe: StatsTimeFrame = "7d" - ): Promise> { - const manager = new ModelUsageStatsManager(); - const result = await manager.getModelUsage(timeframe); - - if (result.error) { - this.setStatus(500); - } else { - this.setStatus(200); - } - - return result; - } - - /** - * Get market share statistics by model author for the AI Gateway. - * Returns time series data (100% stacked) and a leaderboard of top 9 authors + others. - * - * @param timeframe Time range: "24h", "7d", "30d", "3m", or "1y" - */ - @Get("/market-share") - public async getMarketShare( - @Query() timeframe: StatsTimeFrame = "1y" - ): Promise> { - const manager = new ModelUsageStatsManager(); - const result = await manager.getMarketShare(timeframe); - - if (result.error) { - this.setStatus(500); - } else { - this.setStatus(200); - } - - return result; - } - - /** - * Get provider usage statistics for the AI Gateway. - * Returns time series data and a leaderboard of top 9 providers + others. - * - * @param timeframe Time range: "24h", "7d", "30d", "3m", or "1y" - */ - @Get("/provider-usage") - public async getProviderUsage( - @Query() timeframe: StatsTimeFrame = "7d" - ): Promise> { - const manager = new ModelUsageStatsManager(); - const result = await manager.getProviderUsage(timeframe); - - if (result.error) { - this.setStatus(500); - } else { - this.setStatus(200); - } - - return result; - } - - /** - * Get statistics for a specific model author. - * Returns time series data and a leaderboard of top models by that author. - * - * @param author The author identifier (e.g., "openai", "anthropic") - * @param timeframe Time range: "24h", "7d", "30d", "3m", or "1y" - */ - @Get("/authors/{author}") - public async getAuthorStats( - @Path() author: string, - @Query() timeframe: StatsTimeFrame = "7d" - ): Promise> { - const manager = new ModelUsageStatsManager(); - const result = await manager.getAuthorStats(author, timeframe); - - if (result.error) { - this.setStatus(500); - } else { - this.setStatus(200); - } - - return result; - } - - /** - * Get statistics for a specific inference provider. - * Returns time series data and a leaderboard of top models on that provider. - * - * @param provider The provider identifier (e.g., "openai", "anthropic") - * @param timeframe Time range: "24h", "7d", "30d", "3m", or "1y" - */ - @Get("/providers/{provider}") - public async getProviderStats( - @Path() provider: string, - @Query() timeframe: StatsTimeFrame = "7d" - ): Promise> { - const manager = new ModelUsageStatsManager(); - const result = await manager.getProviderStats(provider, timeframe); - - if (result.error) { - this.setStatus(500); - } else { - this.setStatus(200); - } - - return result; - } - - /** - * Get usage statistics for a specific model. - * Returns time series data showing token usage over time. - * - * @param model The model identifier (e.g., "gpt-4", "claude-3-opus") - * @param timeframe Time range: "24h", "7d", "30d", "3m", or "1y" - */ - @Get("/models/{model}") - public async getModelStats( - @Path() model: string, - @Query() timeframe: StatsTimeFrame = "1y" - ): Promise> { - const manager = new ModelUsageStatsManager(); - const result = await manager.getModelStats(model, timeframe); - - if (result.error) { - this.setStatus(500); - } else { - this.setStatus(200); - } - - return result; - } -} diff --git a/valhalla/jawn/src/controllers/public/waitlistController.ts b/valhalla/jawn/src/controllers/public/waitlistController.ts deleted file mode 100644 index 0e1222a3bd..0000000000 --- a/valhalla/jawn/src/controllers/public/waitlistController.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { - Body, - Controller, - Get, - Post, - Query, - Route, - Tags, -} from "tsoa"; -import { Result } from "../../packages/common/result"; -import { WaitlistManager } from "../../managers/waitlist/WaitlistManager"; - -@Route("v1/public/waitlist") -@Tags("Waitlist") -export class WaitListController extends Controller { - @Post("/feature") - public async addToWaitlist( - @Body() - body: { - email: string; - feature: string; - } - ): Promise> { - const manager = new WaitlistManager(); - const result = await manager.addToWaitlist(body.email, body.feature); - - if (result.error) { - if (result.error === "already_on_waitlist") { - this.setStatus(409); - } else if (result.error.startsWith("Unsupported feature")) { - this.setStatus(400); - } else { - this.setStatus(500); - } - return result; - } - - // Return 200 for both new additions and existing users - this.setStatus(200); - return result; - } - - @Get("/feature/status") - public async isOnWaitlist( - @Query() email: string, - @Query() feature: string - ): Promise> { - const manager = new WaitlistManager(); - const result = await manager.isOnWaitlist(email, feature); - - if (result.error) { - if (result.error.startsWith("Unsupported feature")) { - this.setStatus(400); - } else { - this.setStatus(500); - } - return result; - } - - this.setStatus(200); - return result; - } - - @Get("/feature/count") - public async getWaitlistCount( - @Query() feature: string - ): Promise> { - const manager = new WaitlistManager(); - const result = await manager.getWaitlistCount(feature); - - if (result.error) { - if (result.error.startsWith("Unsupported feature")) { - this.setStatus(400); - } else { - this.setStatus(500); - } - return result; - } - - this.setStatus(200); - return result; - } - - @Post("/feature/share") - public async trackShare( - @Body() - body: { - email: string; - feature: string; - platform: "twitter" | "linkedin"; - } - ): Promise> { - const manager = new WaitlistManager(); - const result = await manager.trackShare(body.email, body.feature, body.platform); - - if (result.error) { - if (result.error === "Already shared on this platform") { - this.setStatus(409); - } else if (result.error === "Not found on waitlist") { - this.setStatus(404); - } else if (result.error.startsWith("Unsupported feature")) { - this.setStatus(400); - } else { - this.setStatus(500); - } - return result; - } - - this.setStatus(200); - return result; - } -} \ No newline at end of file diff --git a/valhalla/jawn/src/tsoa-build/public/routes.ts b/valhalla/jawn/src/tsoa-build/public/routes.ts index 90e0f65a71..7994817e1d 100644 --- a/valhalla/jawn/src/tsoa-build/public/routes.ts +++ b/valhalla/jawn/src/tsoa-build/public/routes.ts @@ -26,8 +26,6 @@ import { WrappedController } from './../../controllers/public/wrappedController' // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { WebhookController } from './../../controllers/public/webhookController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { WaitListController } from './../../controllers/public/waitlistController'; -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { VaultController } from './../../controllers/public/vaultController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { UserController } from './../../controllers/public/userController'; @@ -36,8 +34,6 @@ import { TraceController } from './../../controllers/public/traceController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { TestController } from './../../controllers/public/testController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { StatsController } from './../../controllers/public/statsController'; -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { SessionController } from './../../controllers/public/sessionController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { StatusController } from './../../controllers/public/providerStatusController'; @@ -52,16 +48,10 @@ import { PiPublicController } from './../../controllers/public/piPublicControlle // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { PiController } from './../../controllers/public/piController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { ModelRegistryController } from './../../controllers/public/modelRegistryController'; -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { ModelController } from './../../controllers/public/modelController'; -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { ModelComparisonController } from './../../controllers/public/modelComparisonController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { MetricsController } from './../../controllers/public/metricsController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { LLMSecurityController } from './../../controllers/public/llmSecurityController'; -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { HeliconeSqlController } from './../../controllers/public/heliconeSqlController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { ExperimentController } from './../../controllers/public/experimentController'; @@ -78,8 +68,6 @@ import { CustomerController } from './../../controllers/public/customerControlle // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { CreditsController } from './../../controllers/public/creditsController'; // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa -import { AlertBannerController } from './../../controllers/public/alertBannerController'; -// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa import { AgentController } from './../../controllers/public/agentController'; import { expressAuthentication } from './../../authentication'; // @ts-ignore - no great way to install types from subpackage @@ -1971,62 +1959,6 @@ const models: TsoaRoute.Models = { "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess__success-boolean--message-string__"},{"ref":"ResultError_string_"}],"validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess__success-boolean--position_63_-number--alreadyOnList_63_-boolean--sharedPlatforms_63_-string-Array__": { - "dataType": "refObject", - "properties": { - "data": {"dataType":"nestedObjectLiteral","nestedProperties":{"sharedPlatforms":{"dataType":"array","array":{"dataType":"string"}},"alreadyOnList":{"dataType":"boolean"},"position":{"dataType":"double"},"success":{"dataType":"boolean","required":true}},"required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result__success-boolean--position_63_-number--alreadyOnList_63_-boolean--sharedPlatforms_63_-string-Array_.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess__success-boolean--position_63_-number--alreadyOnList_63_-boolean--sharedPlatforms_63_-string-Array__"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess__isOnWaitlist-boolean__": { - "dataType": "refObject", - "properties": { - "data": {"dataType":"nestedObjectLiteral","nestedProperties":{"isOnWaitlist":{"dataType":"boolean","required":true}},"required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result__isOnWaitlist-boolean_.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess__isOnWaitlist-boolean__"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess__count-number__": { - "dataType": "refObject", - "properties": { - "data": {"dataType":"nestedObjectLiteral","nestedProperties":{"count":{"dataType":"double","required":true}},"required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result__count-number_.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess__count-number__"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess__success-boolean--newPosition_63_-number--message-string__": { - "dataType": "refObject", - "properties": { - "data": {"dataType":"nestedObjectLiteral","nestedProperties":{"message":{"dataType":"string","required":true},"newPosition":{"dataType":"double"},"success":{"dataType":"boolean","required":true}},"required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result__success-boolean--newPosition_63_-number--message-string_.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess__success-boolean--newPosition_63_-number--message-string__"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "AddVaultKeyParams": { "dataType": "refObject", "properties": { @@ -2276,254 +2208,6 @@ const models: TsoaRoute.Models = { "additionalProperties": false, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ModelTokens": { - "dataType": "refObject", - "properties": { - "model": {"dataType":"string","required":true}, - "totalTokens": {"dataType":"double","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ModelUsageTimeSeriesDataPoint": { - "dataType": "refObject", - "properties": { - "time": {"dataType":"string","required":true}, - "models": {"dataType":"array","array":{"dataType":"refObject","ref":"ModelTokens"},"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ModelUsageLeaderboardEntry": { - "dataType": "refObject", - "properties": { - "rank": {"dataType":"double","required":true}, - "model": {"dataType":"string","required":true}, - "author": {"dataType":"string","required":true}, - "totalTokens": {"dataType":"double","required":true}, - "percentChange": {"dataType":"union","subSchemas":[{"dataType":"double"},{"dataType":"enum","enums":[null]}],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ModelUsageResponse": { - "dataType": "refObject", - "properties": { - "timeSeries": {"dataType":"array","array":{"dataType":"refObject","ref":"ModelUsageTimeSeriesDataPoint"},"required":true}, - "leaderboard": {"dataType":"array","array":{"dataType":"refObject","ref":"ModelUsageLeaderboardEntry"},"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess_ModelUsageResponse_": { - "dataType": "refObject", - "properties": { - "data": {"ref":"ModelUsageResponse","required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result_ModelUsageResponse.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess_ModelUsageResponse_"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "StatsTimeFrame": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["24h"]},{"dataType":"enum","enums":["7d"]},{"dataType":"enum","enums":["30d"]},{"dataType":"enum","enums":["3m"]},{"dataType":"enum","enums":["1y"]}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "AuthorTokens": { - "dataType": "refObject", - "properties": { - "author": {"dataType":"string","required":true}, - "totalTokens": {"dataType":"double","required":true}, - "percentage": {"dataType":"double","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "MarketShareTimeSeriesDataPoint": { - "dataType": "refObject", - "properties": { - "time": {"dataType":"string","required":true}, - "authors": {"dataType":"array","array":{"dataType":"refObject","ref":"AuthorTokens"},"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "MarketShareLeaderboardEntry": { - "dataType": "refObject", - "properties": { - "rank": {"dataType":"double","required":true}, - "author": {"dataType":"string","required":true}, - "totalTokens": {"dataType":"double","required":true}, - "marketShare": {"dataType":"double","required":true}, - "rankChange": {"dataType":"union","subSchemas":[{"dataType":"double"},{"dataType":"enum","enums":[null]}],"required":true}, - "marketShareChange": {"dataType":"union","subSchemas":[{"dataType":"double"},{"dataType":"enum","enums":[null]}],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "MarketShareResponse": { - "dataType": "refObject", - "properties": { - "timeSeries": {"dataType":"array","array":{"dataType":"refObject","ref":"MarketShareTimeSeriesDataPoint"},"required":true}, - "leaderboard": {"dataType":"array","array":{"dataType":"refObject","ref":"MarketShareLeaderboardEntry"},"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess_MarketShareResponse_": { - "dataType": "refObject", - "properties": { - "data": {"ref":"MarketShareResponse","required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result_MarketShareResponse.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess_MarketShareResponse_"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ProviderTokens": { - "dataType": "refObject", - "properties": { - "provider": {"dataType":"string","required":true}, - "totalTokens": {"dataType":"double","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ProviderUsageTimeSeriesDataPoint": { - "dataType": "refObject", - "properties": { - "time": {"dataType":"string","required":true}, - "providers": {"dataType":"array","array":{"dataType":"refObject","ref":"ProviderTokens"},"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ProviderUsageLeaderboardEntry": { - "dataType": "refObject", - "properties": { - "rank": {"dataType":"double","required":true}, - "provider": {"dataType":"string","required":true}, - "totalTokens": {"dataType":"double","required":true}, - "percentChange": {"dataType":"union","subSchemas":[{"dataType":"double"},{"dataType":"enum","enums":[null]}],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ProviderUsageResponse": { - "dataType": "refObject", - "properties": { - "timeSeries": {"dataType":"array","array":{"dataType":"refObject","ref":"ProviderUsageTimeSeriesDataPoint"},"required":true}, - "leaderboard": {"dataType":"array","array":{"dataType":"refObject","ref":"ProviderUsageLeaderboardEntry"},"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess_ProviderUsageResponse_": { - "dataType": "refObject", - "properties": { - "data": {"ref":"ProviderUsageResponse","required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result_ProviderUsageResponse.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess_ProviderUsageResponse_"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "AuthorStatsResponse": { - "dataType": "refObject", - "properties": { - "author": {"dataType":"string","required":true}, - "totalTokens": {"dataType":"double","required":true}, - "timeSeries": {"dataType":"array","array":{"dataType":"refObject","ref":"ModelUsageTimeSeriesDataPoint"},"required":true}, - "leaderboard": {"dataType":"array","array":{"dataType":"refObject","ref":"ModelUsageLeaderboardEntry"},"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess_AuthorStatsResponse_": { - "dataType": "refObject", - "properties": { - "data": {"ref":"AuthorStatsResponse","required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result_AuthorStatsResponse.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess_AuthorStatsResponse_"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ProviderStatsResponse": { - "dataType": "refObject", - "properties": { - "provider": {"dataType":"string","required":true}, - "totalTokens": {"dataType":"double","required":true}, - "timeSeries": {"dataType":"array","array":{"dataType":"refObject","ref":"ModelUsageTimeSeriesDataPoint"},"required":true}, - "leaderboard": {"dataType":"array","array":{"dataType":"refObject","ref":"ModelUsageLeaderboardEntry"},"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess_ProviderStatsResponse_": { - "dataType": "refObject", - "properties": { - "data": {"ref":"ProviderStatsResponse","required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result_ProviderStatsResponse.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess_ProviderStatsResponse_"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ModelStatsTimeSeriesDataPoint": { - "dataType": "refObject", - "properties": { - "time": {"dataType":"string","required":true}, - "totalTokens": {"dataType":"double","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ModelStatsResponse": { - "dataType": "refObject", - "properties": { - "model": {"dataType":"string","required":true}, - "totalTokens": {"dataType":"double","required":true}, - "timeSeries": {"dataType":"array","array":{"dataType":"refObject","ref":"ModelStatsTimeSeriesDataPoint"},"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess_ModelStatsResponse_": { - "dataType": "refObject", - "properties": { - "data": {"ref":"ModelStatsResponse","required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result_ModelStatsResponse.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess_ModelStatsResponse_"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "SessionResult": { "dataType": "refObject", "properties": { @@ -3276,284 +2960,6 @@ const models: TsoaRoute.Models = { "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess__cost-number--created_at_trunc-string_-Array_"},{"ref":"ResultError_string_"}],"validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "AuthorName": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"union","subSchemas":[{"dataType":"enum","enums":["anthropic"]},{"dataType":"enum","enums":["deepseek"]},{"dataType":"enum","enums":["mistral"]},{"dataType":"enum","enums":["openai"]},{"dataType":"enum","enums":["perplexity"]},{"dataType":"enum","enums":["xai"]},{"dataType":"enum","enums":["google"]},{"dataType":"enum","enums":["meta-llama"]},{"dataType":"enum","enums":["amazon"]},{"dataType":"enum","enums":["microsoft"]},{"dataType":"enum","enums":["nvidia"]},{"dataType":"enum","enums":["qwen"]},{"dataType":"enum","enums":["moonshotai"]},{"dataType":"enum","enums":["alibaba"]},{"dataType":"enum","enums":["zai"]},{"dataType":"enum","enums":["baidu"]}]},{"dataType":"enum","enums":["passthrough"]}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "StandardParameter": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["max_tokens"]},{"dataType":"enum","enums":["max_completion_tokens"]},{"dataType":"enum","enums":["temperature"]},{"dataType":"enum","enums":["top_p"]},{"dataType":"enum","enums":["top_k"]},{"dataType":"enum","enums":["stop"]},{"dataType":"enum","enums":["stream"]},{"dataType":"enum","enums":["frequency_penalty"]},{"dataType":"enum","enums":["presence_penalty"]},{"dataType":"enum","enums":["repetition_penalty"]},{"dataType":"enum","enums":["seed"]},{"dataType":"enum","enums":["tools"]},{"dataType":"enum","enums":["tool_choice"]},{"dataType":"enum","enums":["functions"]},{"dataType":"enum","enums":["function_call"]},{"dataType":"enum","enums":["reasoning"]},{"dataType":"enum","enums":["include_reasoning"]},{"dataType":"enum","enums":["thinking"]},{"dataType":"enum","enums":["response_format"]},{"dataType":"enum","enums":["json_mode"]},{"dataType":"enum","enums":["truncate"]},{"dataType":"enum","enums":["min_p"]},{"dataType":"enum","enums":["logit_bias"]},{"dataType":"enum","enums":["logprobs"]},{"dataType":"enum","enums":["top_logprobs"]},{"dataType":"enum","enums":["structured_outputs"]},{"dataType":"enum","enums":["verbosity"]},{"dataType":"enum","enums":["n"]}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "PluginId": { - "dataType": "refAlias", - "type": {"dataType":"enum","enums":["web"],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "RateLimits": { - "dataType": "refObject", - "properties": { - "rpm": {"dataType":"double"}, - "tpm": {"dataType":"double"}, - "tpd": {"dataType":"double"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ModalityPricing": { - "dataType": "refObject", - "properties": { - "input": {"dataType":"double"}, - "cachedInputMultiplier": {"dataType":"double"}, - "output": {"dataType":"double"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ModelPricing": { - "dataType": "refObject", - "properties": { - "threshold": {"dataType":"double","required":true}, - "input": {"dataType":"double","required":true}, - "output": {"dataType":"double","required":true}, - "cacheMultipliers": {"dataType":"nestedObjectLiteral","nestedProperties":{"write1h":{"dataType":"double"},"write5m":{"dataType":"double"},"cachedInput":{"dataType":"double","required":true}}}, - "cacheStoragePerHour": {"dataType":"double"}, - "thinking": {"dataType":"double"}, - "request": {"dataType":"double"}, - "image": {"ref":"ModalityPricing"}, - "audio": {"ref":"ModalityPricing"}, - "video": {"ref":"ModalityPricing"}, - "file": {"ref":"ModalityPricing"}, - "web_search": {"dataType":"double"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "BodyMappingType": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["OPENAI"]},{"dataType":"enum","enums":["NO_MAPPING"]},{"dataType":"enum","enums":["RESPONSES"]}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "EndpointConfig": { - "dataType": "refObject", - "properties": { - "region": {"dataType":"string"}, - "location": {"dataType":"string"}, - "projectId": {"dataType":"string"}, - "baseUri": {"dataType":"string"}, - "deploymentName": {"dataType":"string"}, - "resourceName": {"dataType":"string"}, - "apiVersion": {"dataType":"string"}, - "crossRegion": {"dataType":"boolean"}, - "gatewayMapping": {"ref":"BodyMappingType"}, - "modelName": {"dataType":"string"}, - "heliconeModelId": {"dataType":"string"}, - "providerModelId": {"dataType":"string"}, - "pricing": {"dataType":"array","array":{"dataType":"refObject","ref":"ModelPricing"}}, - "contextLength": {"dataType":"double"}, - "maxCompletionTokens": {"dataType":"double"}, - "ptbEnabled": {"dataType":"boolean"}, - "version": {"dataType":"string"}, - "rateLimits": {"ref":"RateLimits"}, - "priority": {"dataType":"double"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Record_string.EndpointConfig_": { - "dataType": "refAlias", - "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"additionalProperties":{"ref":"EndpointConfig"},"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResponseFormat": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["ANTHROPIC"]},{"dataType":"enum","enums":["OPENAI"]},{"dataType":"enum","enums":["GOOGLE"]}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ModelProviderConfig": { - "dataType": "refObject", - "properties": { - "pricing": {"dataType":"array","array":{"dataType":"refObject","ref":"ModelPricing"},"required":true}, - "contextLength": {"dataType":"double","required":true}, - "maxCompletionTokens": {"dataType":"double","required":true}, - "ptbEnabled": {"dataType":"boolean","required":true}, - "version": {"dataType":"string"}, - "unsupportedParameters": {"dataType":"array","array":{"dataType":"refAlias","ref":"StandardParameter"}}, - "providerModelId": {"dataType":"string","required":true}, - "provider": {"ref":"ModelProviderName","required":true}, - "author": {"ref":"AuthorName","required":true}, - "supportedParameters": {"dataType":"array","array":{"dataType":"refAlias","ref":"StandardParameter"},"required":true}, - "supportedPlugins": {"dataType":"array","array":{"dataType":"refAlias","ref":"PluginId"}}, - "rateLimits": {"ref":"RateLimits"}, - "endpointConfigs": {"ref":"Record_string.EndpointConfig_","required":true}, - "crossRegion": {"dataType":"boolean"}, - "priority": {"dataType":"double"}, - "quantization": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["fp4"]},{"dataType":"enum","enums":["fp8"]},{"dataType":"enum","enums":["fp16"]},{"dataType":"enum","enums":["bf16"]},{"dataType":"enum","enums":["int4"]}]}, - "responseFormat": {"ref":"ResponseFormat"}, - "requireExplicitRouting": {"dataType":"boolean"}, - "providerModelIdAliases": {"dataType":"array","array":{"dataType":"string"}}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "UserEndpointConfig": { - "dataType": "refObject", - "properties": { - "region": {"dataType":"string"}, - "location": {"dataType":"string"}, - "projectId": {"dataType":"string"}, - "baseUri": {"dataType":"string"}, - "deploymentName": {"dataType":"string"}, - "resourceName": {"dataType":"string"}, - "apiVersion": {"dataType":"string"}, - "crossRegion": {"dataType":"boolean"}, - "gatewayMapping": {"ref":"BodyMappingType"}, - "modelName": {"dataType":"string"}, - "heliconeModelId": {"dataType":"string"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Endpoint": { - "dataType": "refObject", - "properties": { - "pricing": {"dataType":"array","array":{"dataType":"refObject","ref":"ModelPricing"},"required":true}, - "contextLength": {"dataType":"double","required":true}, - "maxCompletionTokens": {"dataType":"double","required":true}, - "ptbEnabled": {"dataType":"boolean","required":true}, - "version": {"dataType":"string"}, - "unsupportedParameters": {"dataType":"array","array":{"dataType":"refAlias","ref":"StandardParameter"}}, - "modelConfig": {"ref":"ModelProviderConfig","required":true}, - "userConfig": {"ref":"UserEndpointConfig","required":true}, - "provider": {"ref":"ModelProviderName","required":true}, - "author": {"ref":"AuthorName","required":true}, - "providerModelId": {"dataType":"string","required":true}, - "supportedParameters": {"dataType":"array","array":{"dataType":"refAlias","ref":"StandardParameter"},"required":true}, - "priority": {"dataType":"double"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "SimplifiedModalityPricing": { - "dataType": "refObject", - "properties": { - "input": {"dataType":"double"}, - "cachedInput": {"dataType":"double"}, - "output": {"dataType":"double"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "SimplifiedPricing": { - "dataType": "refObject", - "properties": { - "prompt": {"dataType":"double","required":true}, - "completion": {"dataType":"double","required":true}, - "audio": {"ref":"SimplifiedModalityPricing"}, - "thinking": {"dataType":"double"}, - "web_search": {"dataType":"double"}, - "image": {"ref":"SimplifiedModalityPricing"}, - "video": {"ref":"SimplifiedModalityPricing"}, - "file": {"ref":"SimplifiedModalityPricing"}, - "cacheRead": {"dataType":"double"}, - "cacheWrite": {"dataType":"double"}, - "threshold": {"dataType":"double"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ModelEndpoint": { - "dataType": "refObject", - "properties": { - "provider": {"dataType":"string","required":true}, - "providerSlug": {"dataType":"string","required":true}, - "endpoint": {"ref":"Endpoint"}, - "supportsPtb": {"dataType":"boolean"}, - "pricing": {"ref":"SimplifiedPricing","required":true}, - "pricingTiers": {"dataType":"array","array":{"dataType":"refObject","ref":"SimplifiedPricing"}}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "InputModality": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["text"]},{"dataType":"enum","enums":["image"]},{"dataType":"enum","enums":["audio"]},{"dataType":"enum","enums":["video"]}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "OutputModality": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["text"]},{"dataType":"enum","enums":["image"]},{"dataType":"enum","enums":["audio"]},{"dataType":"enum","enums":["video"]}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ModelRegistryItem": { - "dataType": "refObject", - "properties": { - "id": {"dataType":"string","required":true}, - "name": {"dataType":"string","required":true}, - "author": {"dataType":"string","required":true}, - "contextLength": {"dataType":"double","required":true}, - "endpoints": {"dataType":"array","array":{"dataType":"refObject","ref":"ModelEndpoint"},"required":true}, - "maxOutput": {"dataType":"double"}, - "trainingDate": {"dataType":"string"}, - "description": {"dataType":"string"}, - "inputModalities": {"dataType":"array","array":{"dataType":"refAlias","ref":"InputModality"},"required":true}, - "outputModalities": {"dataType":"array","array":{"dataType":"refAlias","ref":"OutputModality"},"required":true}, - "supportedParameters": {"dataType":"array","array":{"dataType":"refAlias","ref":"StandardParameter"},"required":true}, - "pinnedVersionOfModel": {"dataType":"string"}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ModelCapability": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["audio"]},{"dataType":"enum","enums":["video"]},{"dataType":"enum","enums":["image"]},{"dataType":"enum","enums":["thinking"]},{"dataType":"enum","enums":["web_search"]},{"dataType":"enum","enums":["caching"]},{"dataType":"enum","enums":["reasoning"]}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ModelRegistryResponse": { - "dataType": "refObject", - "properties": { - "models": {"dataType":"array","array":{"dataType":"refObject","ref":"ModelRegistryItem"},"required":true}, - "total": {"dataType":"double","required":true}, - "filters": {"dataType":"nestedObjectLiteral","nestedProperties":{"capabilities":{"dataType":"array","array":{"dataType":"refAlias","ref":"ModelCapability"},"required":true},"authors":{"dataType":"array","array":{"dataType":"string"},"required":true},"providers":{"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"displayName":{"dataType":"string","required":true},"name":{"dataType":"string","required":true}}},"required":true}},"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess_ModelRegistryResponse_": { - "dataType": "refObject", - "properties": { - "data": {"ref":"ModelRegistryResponse","required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result_ModelRegistryResponse.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess_ModelRegistryResponse_"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "OAIModel": { - "dataType": "refObject", - "properties": { - "id": {"dataType":"string","required":true}, - "object": {"dataType":"enum","enums":["model"],"required":true}, - "created": {"dataType":"double","required":true}, - "owned_by": {"dataType":"string","required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "OAIModelsResponse": { - "dataType": "refObject", - "properties": { - "object": {"dataType":"enum","enums":["list"],"required":true}, - "data": {"dataType":"array","array":{"dataType":"refObject","ref":"OAIModel"},"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "MetricStats": { "dataType": "refAlias", "type": {"dataType":"nestedObjectLiteral","nestedProperties":{"p99":{"dataType":"double","required":true},"p95":{"dataType":"double","required":true},"p90":{"dataType":"double","required":true},"max":{"dataType":"double","required":true},"min":{"dataType":"double","required":true},"median":{"dataType":"double","required":true},"average":{"dataType":"double","required":true}},"validators":{}}, @@ -3942,20 +3348,6 @@ const models: TsoaRoute.Models = { "additionalProperties": false, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess__unsafe-boolean__": { - "dataType": "refObject", - "properties": { - "data": {"dataType":"nestedObjectLiteral","nestedProperties":{"unsafe":{"dataType":"boolean","required":true}},"required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result__unsafe-boolean_.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess__unsafe-boolean__"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "ClickHouseTableColumn": { "dataType": "refObject", "properties": { @@ -4861,20 +4253,6 @@ const models: TsoaRoute.Models = { "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess_OrgDiscount-Array_"},{"ref":"ResultError_string_"}],"validators":{}}, }, // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "ResultSuccess__id-number--active-boolean--title-string--message-string--created_at-string--updated_at-string_-Array_": { - "dataType": "refObject", - "properties": { - "data": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"updated_at":{"dataType":"string","required":true},"created_at":{"dataType":"string","required":true},"message":{"dataType":"string","required":true},"title":{"dataType":"string","required":true},"active":{"dataType":"boolean","required":true},"id":{"dataType":"double","required":true}}},"required":true}, - "error": {"dataType":"enum","enums":[null],"required":true}, - }, - "additionalProperties": false, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - "Result__id-number--active-boolean--title-string--message-string--created_at-string--updated_at-string_-Array.string_": { - "dataType": "refAlias", - "type": {"dataType":"union","subSchemas":[{"ref":"ResultSuccess__id-number--active-boolean--title-string--message-string--created_at-string--updated_at-string_-Array_"},{"ref":"ResultError_string_"}],"validators":{}}, - }, - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa "InAppThread": { "dataType": "refObject", "properties": { @@ -9365,127 +8743,6 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const argsWaitListController_addToWaitlist: Record = { - body: {"in":"body","name":"body","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"feature":{"dataType":"string","required":true},"email":{"dataType":"string","required":true}}}, - }; - app.post('/v1/public/waitlist/feature', - ...(fetchMiddlewares(WaitListController)), - ...(fetchMiddlewares(WaitListController.prototype.addToWaitlist)), - - async function WaitListController_addToWaitlist(request: ExRequest, response: ExResponse, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args: argsWaitListController_addToWaitlist, request, response }); - - const controller = new WaitListController(); - - await templateService.apiHandler({ - methodName: 'addToWaitlist', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const argsWaitListController_isOnWaitlist: Record = { - email: {"in":"query","name":"email","required":true,"dataType":"string"}, - feature: {"in":"query","name":"feature","required":true,"dataType":"string"}, - }; - app.get('/v1/public/waitlist/feature/status', - ...(fetchMiddlewares(WaitListController)), - ...(fetchMiddlewares(WaitListController.prototype.isOnWaitlist)), - - async function WaitListController_isOnWaitlist(request: ExRequest, response: ExResponse, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args: argsWaitListController_isOnWaitlist, request, response }); - - const controller = new WaitListController(); - - await templateService.apiHandler({ - methodName: 'isOnWaitlist', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const argsWaitListController_getWaitlistCount: Record = { - feature: {"in":"query","name":"feature","required":true,"dataType":"string"}, - }; - app.get('/v1/public/waitlist/feature/count', - ...(fetchMiddlewares(WaitListController)), - ...(fetchMiddlewares(WaitListController.prototype.getWaitlistCount)), - - async function WaitListController_getWaitlistCount(request: ExRequest, response: ExResponse, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args: argsWaitListController_getWaitlistCount, request, response }); - - const controller = new WaitListController(); - - await templateService.apiHandler({ - methodName: 'getWaitlistCount', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const argsWaitListController_trackShare: Record = { - body: {"in":"body","name":"body","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"platform":{"dataType":"union","subSchemas":[{"dataType":"enum","enums":["twitter"]},{"dataType":"enum","enums":["linkedin"]}],"required":true},"feature":{"dataType":"string","required":true},"email":{"dataType":"string","required":true}}}, - }; - app.post('/v1/public/waitlist/feature/share', - ...(fetchMiddlewares(WaitListController)), - ...(fetchMiddlewares(WaitListController.prototype.trackShare)), - - async function WaitListController_trackShare(request: ExRequest, response: ExResponse, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args: argsWaitListController_trackShare, request, response }); - - const controller = new WaitListController(); - - await templateService.apiHandler({ - methodName: 'trackShare', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa const argsVaultController_addKey: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"AddVaultKeyParams"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, @@ -9901,189 +9158,6 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const argsStatsController_getModelUsage: Record = { - timeframe: {"default":"7d","in":"query","name":"timeframe","ref":"StatsTimeFrame"}, - }; - app.get('/v1/public/stats/model-usage', - ...(fetchMiddlewares(StatsController)), - ...(fetchMiddlewares(StatsController.prototype.getModelUsage)), - - async function StatsController_getModelUsage(request: ExRequest, response: ExResponse, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args: argsStatsController_getModelUsage, request, response }); - - const controller = new StatsController(); - - await templateService.apiHandler({ - methodName: 'getModelUsage', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const argsStatsController_getMarketShare: Record = { - timeframe: {"default":"1y","in":"query","name":"timeframe","ref":"StatsTimeFrame"}, - }; - app.get('/v1/public/stats/market-share', - ...(fetchMiddlewares(StatsController)), - ...(fetchMiddlewares(StatsController.prototype.getMarketShare)), - - async function StatsController_getMarketShare(request: ExRequest, response: ExResponse, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args: argsStatsController_getMarketShare, request, response }); - - const controller = new StatsController(); - - await templateService.apiHandler({ - methodName: 'getMarketShare', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const argsStatsController_getProviderUsage: Record = { - timeframe: {"default":"7d","in":"query","name":"timeframe","ref":"StatsTimeFrame"}, - }; - app.get('/v1/public/stats/provider-usage', - ...(fetchMiddlewares(StatsController)), - ...(fetchMiddlewares(StatsController.prototype.getProviderUsage)), - - async function StatsController_getProviderUsage(request: ExRequest, response: ExResponse, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args: argsStatsController_getProviderUsage, request, response }); - - const controller = new StatsController(); - - await templateService.apiHandler({ - methodName: 'getProviderUsage', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const argsStatsController_getAuthorStats: Record = { - author: {"in":"path","name":"author","required":true,"dataType":"string"}, - timeframe: {"default":"7d","in":"query","name":"timeframe","ref":"StatsTimeFrame"}, - }; - app.get('/v1/public/stats/authors/:author', - ...(fetchMiddlewares(StatsController)), - ...(fetchMiddlewares(StatsController.prototype.getAuthorStats)), - - async function StatsController_getAuthorStats(request: ExRequest, response: ExResponse, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args: argsStatsController_getAuthorStats, request, response }); - - const controller = new StatsController(); - - await templateService.apiHandler({ - methodName: 'getAuthorStats', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const argsStatsController_getProviderStats: Record = { - provider: {"in":"path","name":"provider","required":true,"dataType":"string"}, - timeframe: {"default":"7d","in":"query","name":"timeframe","ref":"StatsTimeFrame"}, - }; - app.get('/v1/public/stats/providers/:provider', - ...(fetchMiddlewares(StatsController)), - ...(fetchMiddlewares(StatsController.prototype.getProviderStats)), - - async function StatsController_getProviderStats(request: ExRequest, response: ExResponse, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args: argsStatsController_getProviderStats, request, response }); - - const controller = new StatsController(); - - await templateService.apiHandler({ - methodName: 'getProviderStats', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const argsStatsController_getModelStats: Record = { - model: {"in":"path","name":"model","required":true,"dataType":"string"}, - timeframe: {"default":"1y","in":"query","name":"timeframe","ref":"StatsTimeFrame"}, - }; - app.get('/v1/public/stats/models/:model', - ...(fetchMiddlewares(StatsController)), - ...(fetchMiddlewares(StatsController.prototype.getModelStats)), - - async function StatsController_getModelStats(request: ExRequest, response: ExResponse, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args: argsStatsController_getModelStats, request, response }); - - const controller = new StatsController(); - - await templateService.apiHandler({ - methodName: 'getModelStats', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa const argsSessionController_getSessions: Record = { requestBody: {"in":"body","name":"requestBody","required":true,"ref":"SessionQueryParams"}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, @@ -10948,93 +10022,6 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const argsModelRegistryController_getModelRegistry: Record = { - }; - app.get('/v1/public/model-registry/models', - ...(fetchMiddlewares(ModelRegistryController)), - ...(fetchMiddlewares(ModelRegistryController.prototype.getModelRegistry)), - - async function ModelRegistryController_getModelRegistry(request: ExRequest, response: ExResponse, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args: argsModelRegistryController_getModelRegistry, request, response }); - - const controller = new ModelRegistryController(); - - await templateService.apiHandler({ - methodName: 'getModelRegistry', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const argsModelController_getModels: Record = { - }; - app.get('/v1/models', - ...(fetchMiddlewares(ModelController)), - ...(fetchMiddlewares(ModelController.prototype.getModels)), - - async function ModelController_getModels(request: ExRequest, response: ExResponse, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args: argsModelController_getModels, request, response }); - - const controller = new ModelController(); - - await templateService.apiHandler({ - methodName: 'getModels', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const argsModelController_getMultimodalModels: Record = { - }; - app.get('/v1/models/multimodal', - ...(fetchMiddlewares(ModelController)), - ...(fetchMiddlewares(ModelController.prototype.getMultimodalModels)), - - async function ModelController_getMultimodalModels(request: ExRequest, response: ExResponse, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args: argsModelController_getMultimodalModels, request, response }); - - const controller = new ModelController(); - - await templateService.apiHandler({ - methodName: 'getMultimodalModels', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa const argsModelComparisonController_getModelComparison: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, modelsToCompare: {"in":"body","name":"modelsToCompare","required":true,"dataType":"array","array":{"dataType":"refAlias","ref":"ModelsToCompare"}}, @@ -11707,37 +10694,6 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const argsLLMSecurityController_getSecurity: Record = { - body: {"in":"body","name":"body","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"text":{"dataType":"string","required":true},"advanced":{"dataType":"boolean","required":true}}}, - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - app.post('/v1/public/security', - ...(fetchMiddlewares(LLMSecurityController)), - ...(fetchMiddlewares(LLMSecurityController.prototype.getSecurity)), - - async function LLMSecurityController_getSecurity(request: ExRequest, response: ExResponse, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args: argsLLMSecurityController_getSecurity, request, response }); - - const controller = new LLMSecurityController(); - - await templateService.apiHandler({ - methodName: 'getSecurity', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa const argsHeliconeSqlController_getClickHouseSchema: Record = { request: {"in":"request","name":"request","required":true,"dataType":"object"}, }; @@ -13543,67 +12499,6 @@ export function RegisterRoutes(app: Router) { } }); // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const argsAlertBannerController_updateAlertBannerActive: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - body: {"in":"body","name":"body","required":true,"dataType":"nestedObjectLiteral","nestedProperties":{"active":{"dataType":"boolean","required":true},"id":{"dataType":"double","required":true}}}, - }; - app.patch('/v1/public/alert-banner', - ...(fetchMiddlewares(AlertBannerController)), - ...(fetchMiddlewares(AlertBannerController.prototype.updateAlertBannerActive)), - - async function AlertBannerController_updateAlertBannerActive(request: ExRequest, response: ExResponse, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args: argsAlertBannerController_updateAlertBannerActive, request, response }); - - const controller = new AlertBannerController(); - - await templateService.apiHandler({ - methodName: 'updateAlertBannerActive', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - const argsAlertBannerController_getAlertBanners: Record = { - request: {"in":"request","name":"request","required":true,"dataType":"object"}, - }; - app.get('/v1/public/alert-banner', - ...(fetchMiddlewares(AlertBannerController)), - ...(fetchMiddlewares(AlertBannerController.prototype.getAlertBanners)), - - async function AlertBannerController_getAlertBanners(request: ExRequest, response: ExResponse, next: any) { - - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa - - let validatedArgs: any[] = []; - try { - validatedArgs = templateService.getValidatedArgs({ args: argsAlertBannerController_getAlertBanners, request, response }); - - const controller = new AlertBannerController(); - - await templateService.apiHandler({ - methodName: 'getAlertBanners', - controller, - response, - next, - validatedArgs, - successStatus: undefined, - }); - } catch (err) { - return next(err); - } - }); - // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa const argsAgentController_generate: Record = { bodyParams: {"in":"body","name":"bodyParams","required":true,"dataType":"intersection","subSchemas":[{"ref":"OpenAIChatRequest"},{"dataType":"nestedObjectLiteral","nestedProperties":{"inputs":{"dataType":"any"},"environment":{"dataType":"string"},"prompt_id":{"dataType":"string"},"logRequest":{"dataType":"boolean"},"useAIGateway":{"dataType":"boolean"}}}]}, request: {"in":"request","name":"request","required":true,"dataType":"object"}, diff --git a/valhalla/jawn/src/tsoa-build/public/swagger.json b/valhalla/jawn/src/tsoa-build/public/swagger.json index a46ebff397..34298fb357 100644 --- a/valhalla/jawn/src/tsoa-build/public/swagger.json +++ b/valhalla/jawn/src/tsoa-build/public/swagger.json @@ -6296,180 +6296,6 @@ } ] }, - "ResultSuccess__success-boolean--position_63_-number--alreadyOnList_63_-boolean--sharedPlatforms_63_-string-Array__": { - "properties": { - "data": { - "properties": { - "sharedPlatforms": { - "items": { - "type": "string" - }, - "type": "array" - }, - "alreadyOnList": { - "type": "boolean" - }, - "position": { - "type": "number", - "format": "double" - }, - "success": { - "type": "boolean" - } - }, - "required": [ - "success" - ], - "type": "object" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result__success-boolean--position_63_-number--alreadyOnList_63_-boolean--sharedPlatforms_63_-string-Array_.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess__success-boolean--position_63_-number--alreadyOnList_63_-boolean--sharedPlatforms_63_-string-Array__" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "ResultSuccess__isOnWaitlist-boolean__": { - "properties": { - "data": { - "properties": { - "isOnWaitlist": { - "type": "boolean" - } - }, - "required": [ - "isOnWaitlist" - ], - "type": "object" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result__isOnWaitlist-boolean_.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess__isOnWaitlist-boolean__" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "ResultSuccess__count-number__": { - "properties": { - "data": { - "properties": { - "count": { - "type": "number", - "format": "double" - } - }, - "required": [ - "count" - ], - "type": "object" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result__count-number_.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess__count-number__" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "ResultSuccess__success-boolean--newPosition_63_-number--message-string__": { - "properties": { - "data": { - "properties": { - "message": { - "type": "string" - }, - "newPosition": { - "type": "number", - "format": "double" - }, - "success": { - "type": "boolean" - } - }, - "required": [ - "message", - "success" - ], - "type": "object" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result__success-boolean--newPosition_63_-number--message-string_.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess__success-boolean--newPosition_63_-number--message-string__" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, "AddVaultKeyParams": { "properties": { "key": { @@ -7370,100 +7196,74 @@ "type": "object", "additionalProperties": false }, - "ModelTokens": { + "SessionResult": { "properties": { - "model": { + "created_at": { "type": "string" }, - "totalTokens": { + "latest_request_created_at": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "session_name": { + "type": "string" + }, + "total_cost": { "type": "number", "format": "double" - } - }, - "required": [ - "model", - "totalTokens" - ], - "type": "object", - "additionalProperties": false - }, - "ModelUsageTimeSeriesDataPoint": { - "properties": { - "time": { - "type": "string" }, - "models": { - "items": { - "$ref": "#/components/schemas/ModelTokens" - }, - "type": "array" - } - }, - "required": [ - "time", - "models" - ], - "type": "object", - "additionalProperties": false - }, - "ModelUsageLeaderboardEntry": { - "properties": { - "rank": { + "total_requests": { "type": "number", "format": "double" }, - "model": { - "type": "string" + "prompt_tokens": { + "type": "number", + "format": "double" }, - "author": { - "type": "string" + "completion_tokens": { + "type": "number", + "format": "double" }, - "totalTokens": { + "total_tokens": { "type": "number", "format": "double" }, - "percentChange": { + "avg_latency": { "type": "number", - "format": "double", - "nullable": true - } - }, - "required": [ - "rank", - "model", - "author", - "totalTokens", - "percentChange" - ], - "type": "object", - "additionalProperties": false - }, - "ModelUsageResponse": { - "properties": { - "timeSeries": { - "items": { - "$ref": "#/components/schemas/ModelUsageTimeSeriesDataPoint" - }, - "type": "array" + "format": "double" }, - "leaderboard": { + "user_ids": { "items": { - "$ref": "#/components/schemas/ModelUsageLeaderboardEntry" + "type": "string" }, "type": "array" } }, "required": [ - "timeSeries", - "leaderboard" + "created_at", + "latest_request_created_at", + "session_id", + "session_name", + "total_cost", + "total_requests", + "prompt_tokens", + "completion_tokens", + "total_tokens", + "avg_latency", + "user_ids" ], "type": "object", "additionalProperties": false }, - "ResultSuccess_ModelUsageResponse_": { + "ResultSuccess_SessionResult-Array_": { "properties": { "data": { - "$ref": "#/components/schemas/ModelUsageResponse" + "items": { + "$ref": "#/components/schemas/SessionResult" + }, + "type": "array" }, "error": { "type": "number", @@ -7480,132 +7280,157 @@ "type": "object", "additionalProperties": false }, - "Result_ModelUsageResponse.string_": { + "Result_SessionResult-Array.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess_ModelUsageResponse_" + "$ref": "#/components/schemas/ResultSuccess_SessionResult-Array_" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "StatsTimeFrame": { - "type": "string", - "enum": [ - "24h", - "7d", - "30d", - "3m", - "1y" - ] - }, - "AuthorTokens": { + "Pick_FilterLeaf.request_response_rmt-or-sessions_request_response_rmt_": { "properties": { - "author": { - "type": "string" - }, - "totalTokens": { - "type": "number", - "format": "double" + "request_response_rmt": { + "$ref": "#/components/schemas/Partial_RequestResponseRMTToOperators_" }, - "percentage": { - "type": "number", - "format": "double" + "sessions_request_response_rmt": { + "$ref": "#/components/schemas/Partial_SessionsRequestResponseRMTToOperators_" } }, - "required": [ - "author", - "totalTokens", - "percentage" - ], "type": "object", - "additionalProperties": false + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "FilterLeafSubset_request_response_rmt-or-sessions_request_response_rmt_": { + "$ref": "#/components/schemas/Pick_FilterLeaf.request_response_rmt-or-sessions_request_response_rmt_" + }, + "SessionFilterNode": { + "anyOf": [ + { + "$ref": "#/components/schemas/FilterLeafSubset_request_response_rmt-or-sessions_request_response_rmt_" + }, + { + "$ref": "#/components/schemas/SessionFilterBranch" + }, + { + "type": "string", + "enum": [ + "all" + ] + } + ] }, - "MarketShareTimeSeriesDataPoint": { + "SessionFilterBranch": { "properties": { - "time": { - "type": "string" + "right": { + "$ref": "#/components/schemas/SessionFilterNode" }, - "authors": { - "items": { - "$ref": "#/components/schemas/AuthorTokens" - }, - "type": "array" + "operator": { + "type": "string", + "enum": [ + "or", + "and" + ] + }, + "left": { + "$ref": "#/components/schemas/SessionFilterNode" } }, "required": [ - "time", - "authors" + "right", + "operator", + "left" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "MarketShareLeaderboardEntry": { + "SessionQueryParams": { "properties": { - "rank": { - "type": "number", - "format": "double" + "search": { + "type": "string" + }, + "timeFilter": { + "properties": { + "endTimeUnixMs": { + "type": "number", + "format": "double" + }, + "startTimeUnixMs": { + "type": "number", + "format": "double" + } + }, + "required": [ + "endTimeUnixMs", + "startTimeUnixMs" + ], + "type": "object" }, - "author": { + "nameEquals": { "type": "string" }, - "totalTokens": { + "timezoneDifference": { "type": "number", "format": "double" }, - "marketShare": { - "type": "number", - "format": "double" + "filter": { + "$ref": "#/components/schemas/SessionFilterNode" }, - "rankChange": { + "offset": { "type": "number", - "format": "double", - "nullable": true + "format": "double" }, - "marketShareChange": { + "limit": { "type": "number", - "format": "double", - "nullable": true + "format": "double" } }, "required": [ - "rank", - "author", - "totalTokens", - "marketShare", - "rankChange", - "marketShareChange" + "search", + "timeFilter", + "timezoneDifference", + "filter" ], "type": "object", "additionalProperties": false }, - "MarketShareResponse": { + "SessionsAggregateMetrics": { "properties": { - "timeSeries": { - "items": { - "$ref": "#/components/schemas/MarketShareTimeSeriesDataPoint" - }, - "type": "array" + "count": { + "type": "number", + "format": "double" }, - "leaderboard": { - "items": { - "$ref": "#/components/schemas/MarketShareLeaderboardEntry" - }, - "type": "array" + "total_cost": { + "type": "number", + "format": "double" + }, + "avg_cost": { + "type": "number", + "format": "double" + }, + "avg_latency": { + "type": "number", + "format": "double" + }, + "avg_requests": { + "type": "number", + "format": "double" } }, "required": [ - "timeSeries", - "leaderboard" + "count", + "total_cost", + "avg_cost", + "avg_latency", + "avg_requests" ], "type": "object", "additionalProperties": false }, - "ResultSuccess_MarketShareResponse_": { + "ResultSuccess_SessionsAggregateMetrics_": { "properties": { "data": { - "$ref": "#/components/schemas/MarketShareResponse" + "$ref": "#/components/schemas/SessionsAggregateMetrics" }, "error": { "type": "number", @@ -7622,106 +7447,57 @@ "type": "object", "additionalProperties": false }, - "Result_MarketShareResponse.string_": { + "Result_SessionsAggregateMetrics.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess_MarketShareResponse_" + "$ref": "#/components/schemas/ResultSuccess_SessionsAggregateMetrics_" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "ProviderTokens": { + "SessionNameResult": { "properties": { - "provider": { + "name": { "type": "string" }, - "totalTokens": { - "type": "number", - "format": "double" - } - }, - "required": [ - "provider", - "totalTokens" - ], - "type": "object", - "additionalProperties": false - }, - "ProviderUsageTimeSeriesDataPoint": { - "properties": { - "time": { + "created_at": { "type": "string" }, - "providers": { - "items": { - "$ref": "#/components/schemas/ProviderTokens" - }, - "type": "array" - } - }, - "required": [ - "time", - "providers" - ], - "type": "object", - "additionalProperties": false - }, - "ProviderUsageLeaderboardEntry": { - "properties": { - "rank": { - "type": "number", - "format": "double" + "last_used": { + "type": "string" }, - "provider": { + "first_used": { "type": "string" }, - "totalTokens": { + "session_count": { "type": "number", "format": "double" }, - "percentChange": { + "avg_latency": { "type": "number", - "format": "double", - "nullable": true + "format": "double" } }, "required": [ - "rank", - "provider", - "totalTokens", - "percentChange" + "name", + "created_at", + "last_used", + "first_used", + "session_count", + "avg_latency" ], "type": "object", "additionalProperties": false }, - "ProviderUsageResponse": { + "ResultSuccess_SessionNameResult-Array_": { "properties": { - "timeSeries": { - "items": { - "$ref": "#/components/schemas/ProviderUsageTimeSeriesDataPoint" - }, - "type": "array" - }, - "leaderboard": { + "data": { "items": { - "$ref": "#/components/schemas/ProviderUsageLeaderboardEntry" + "$ref": "#/components/schemas/SessionNameResult" }, "type": "array" - } - }, - "required": [ - "timeSeries", - "leaderboard" - ], - "type": "object", - "additionalProperties": false - }, - "ResultSuccess_ProviderUsageResponse_": { - "properties": { - "data": { - "$ref": "#/components/schemas/ProviderUsageResponse" }, "error": { "type": "number", @@ -7738,112 +7514,145 @@ "type": "object", "additionalProperties": false }, - "Result_ProviderUsageResponse.string_": { + "Result_SessionNameResult-Array.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess_ProviderUsageResponse_" + "$ref": "#/components/schemas/ResultSuccess_SessionNameResult-Array_" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "AuthorStatsResponse": { + "TimeFilterMs": { "properties": { - "author": { - "type": "string" - }, - "totalTokens": { + "startTimeUnixMs": { "type": "number", "format": "double" }, - "timeSeries": { - "items": { - "$ref": "#/components/schemas/ModelUsageTimeSeriesDataPoint" - }, - "type": "array" - }, - "leaderboard": { - "items": { - "$ref": "#/components/schemas/ModelUsageLeaderboardEntry" - }, - "type": "array" + "endTimeUnixMs": { + "type": "number", + "format": "double" } }, "required": [ - "author", - "totalTokens", - "timeSeries", - "leaderboard" + "startTimeUnixMs", + "endTimeUnixMs" ], "type": "object", "additionalProperties": false }, - "ResultSuccess_AuthorStatsResponse_": { + "SessionNameQueryParams": { "properties": { - "data": { - "$ref": "#/components/schemas/AuthorStatsResponse" + "nameContains": { + "type": "string" }, - "error": { + "timezoneDifference": { "type": "number", + "format": "double" + }, + "pSize": { + "type": "string", "enum": [ - null - ], - "nullable": true + "p50", + "p75", + "p95", + "p99", + "p99.9" + ] + }, + "useInterquartile": { + "type": "boolean" + }, + "timeFilter": { + "$ref": "#/components/schemas/TimeFilterMs" + }, + "filter": { + "$ref": "#/components/schemas/SessionFilterNode" } }, "required": [ - "data", - "error" + "nameContains", + "timezoneDifference" ], "type": "object", "additionalProperties": false }, - "Result_AuthorStatsResponse.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess_AuthorStatsResponse_" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "ProviderStatsResponse": { + "AverageRow": { "properties": { - "provider": { - "type": "string" - }, - "totalTokens": { + "average": { "type": "number", "format": "double" + } + }, + "required": [ + "average" + ], + "type": "object", + "additionalProperties": false + }, + "SessionMetrics": { + "properties": { + "session_count": { + "items": { + "$ref": "#/components/schemas/HistogramRow" + }, + "type": "array" }, - "timeSeries": { + "session_duration": { "items": { - "$ref": "#/components/schemas/ModelUsageTimeSeriesDataPoint" + "$ref": "#/components/schemas/HistogramRow" }, "type": "array" }, - "leaderboard": { + "session_cost": { "items": { - "$ref": "#/components/schemas/ModelUsageLeaderboardEntry" + "$ref": "#/components/schemas/HistogramRow" }, "type": "array" + }, + "average": { + "properties": { + "session_cost": { + "items": { + "$ref": "#/components/schemas/AverageRow" + }, + "type": "array" + }, + "session_duration": { + "items": { + "$ref": "#/components/schemas/AverageRow" + }, + "type": "array" + }, + "session_count": { + "items": { + "$ref": "#/components/schemas/AverageRow" + }, + "type": "array" + } + }, + "required": [ + "session_cost", + "session_duration", + "session_count" + ], + "type": "object" } }, "required": [ - "provider", - "totalTokens", - "timeSeries", - "leaderboard" + "session_count", + "session_duration", + "session_cost", + "average" ], "type": "object", "additionalProperties": false }, - "ResultSuccess_ProviderStatsResponse_": { + "ResultSuccess_SessionMetrics_": { "properties": { "data": { - "$ref": "#/components/schemas/ProviderStatsResponse" + "$ref": "#/components/schemas/SessionMetrics" }, "error": { "type": "number", @@ -7860,61 +7669,57 @@ "type": "object", "additionalProperties": false }, - "Result_ProviderStatsResponse.string_": { + "Result_SessionMetrics.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess_ProviderStatsResponse_" + "$ref": "#/components/schemas/ResultSuccess_SessionMetrics_" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "ModelStatsTimeSeriesDataPoint": { + "SessionMetricsQueryParams": { "properties": { - "time": { + "nameContains": { "type": "string" }, - "totalTokens": { + "timezoneDifference": { "type": "number", "format": "double" - } - }, - "required": [ - "time", - "totalTokens" - ], - "type": "object", - "additionalProperties": false - }, - "ModelStatsResponse": { - "properties": { - "model": { - "type": "string" }, - "totalTokens": { - "type": "number", - "format": "double" + "pSize": { + "type": "string", + "enum": [ + "p50", + "p75", + "p95", + "p99", + "p99.9" + ] }, - "timeSeries": { - "items": { - "$ref": "#/components/schemas/ModelStatsTimeSeriesDataPoint" - }, - "type": "array" + "useInterquartile": { + "type": "boolean" + }, + "timeFilter": { + "$ref": "#/components/schemas/TimeFilterMs" + }, + "filter": { + "$ref": "#/components/schemas/SessionFilterNode" } }, "required": [ - "model", - "totalTokens", - "timeSeries" + "nameContains", + "timezoneDifference" ], "type": "object", "additionalProperties": false }, - "ResultSuccess_ModelStatsResponse_": { + "ResultSuccess_string-or-null_": { "properties": { "data": { - "$ref": "#/components/schemas/ModelStatsResponse" + "type": "string", + "nullable": true }, "error": { "type": "number", @@ -7931,82 +7736,156 @@ "type": "object", "additionalProperties": false }, - "Result_ModelStatsResponse.string_": { + "Result_string-or-null.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess_ModelStatsResponse_" + "$ref": "#/components/schemas/ResultSuccess_string-or-null_" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "SessionResult": { + "MetricsData": { "properties": { - "created_at": { - "type": "string" + "totalRequests": { + "type": "number", + "format": "double" }, - "latest_request_created_at": { - "type": "string" + "requestCountPrevious24h": { + "type": "number", + "format": "double" }, - "session_id": { - "type": "string" + "requestVolumeChange": { + "type": "number", + "format": "double" }, - "session_name": { - "type": "string" + "errorRate24h": { + "type": "number", + "format": "double" }, - "total_cost": { + "errorRatePrevious24h": { "type": "number", "format": "double" }, - "total_requests": { + "errorRateChange": { "type": "number", "format": "double" }, - "prompt_tokens": { + "averageLatency": { "type": "number", "format": "double" }, - "completion_tokens": { + "averageLatencyPerToken": { "type": "number", "format": "double" }, - "total_tokens": { + "latencyChange": { "type": "number", "format": "double" }, - "avg_latency": { + "latencyPerTokenChange": { "type": "number", "format": "double" }, - "user_ids": { - "items": { - "type": "string" - }, - "type": "array" + "recentRequestCount": { + "type": "number", + "format": "double" + }, + "recentErrorCount": { + "type": "number", + "format": "double" } }, "required": [ - "created_at", - "latest_request_created_at", - "session_id", - "session_name", - "total_cost", - "total_requests", - "prompt_tokens", - "completion_tokens", - "total_tokens", - "avg_latency", - "user_ids" + "totalRequests", + "requestCountPrevious24h", + "requestVolumeChange", + "errorRate24h", + "errorRatePrevious24h", + "errorRateChange", + "averageLatency", + "averageLatencyPerToken", + "latencyChange", + "latencyPerTokenChange", + "recentRequestCount", + "recentErrorCount" ], "type": "object", "additionalProperties": false }, - "ResultSuccess_SessionResult-Array_": { + "TimeSeriesDataPoint": { + "properties": { + "timestamp": { + "type": "string", + "format": "date-time" + }, + "errorCount": { + "type": "number", + "format": "double" + }, + "requestCount": { + "type": "number", + "format": "double" + }, + "averageLatency": { + "type": "number", + "format": "double" + }, + "averageLatencyPerCompletionToken": { + "type": "number", + "format": "double" + } + }, + "required": [ + "timestamp", + "errorCount", + "requestCount", + "averageLatency", + "averageLatencyPerCompletionToken" + ], + "type": "object", + "additionalProperties": false + }, + "ProviderMetrics": { + "properties": { + "providerName": { + "type": "string" + }, + "metrics": { + "allOf": [ + { + "$ref": "#/components/schemas/MetricsData" + }, + { + "properties": { + "timeSeriesData": { + "items": { + "$ref": "#/components/schemas/TimeSeriesDataPoint" + }, + "type": "array" + } + }, + "required": [ + "timeSeriesData" + ], + "type": "object" + } + ] + } + }, + "required": [ + "providerName", + "metrics" + ], + "type": "object", + "additionalProperties": false + }, + "ResultSuccess_ProviderMetrics-Array_": { "properties": { "data": { "items": { - "$ref": "#/components/schemas/SessionResult" + "$ref": "#/components/schemas/ProviderMetrics" }, "type": "array" }, @@ -8025,157 +7904,20 @@ "type": "object", "additionalProperties": false }, - "Result_SessionResult-Array.string_": { + "Result_ProviderMetrics-Array.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess_SessionResult-Array_" + "$ref": "#/components/schemas/ResultSuccess_ProviderMetrics-Array_" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "Pick_FilterLeaf.request_response_rmt-or-sessions_request_response_rmt_": { - "properties": { - "request_response_rmt": { - "$ref": "#/components/schemas/Partial_RequestResponseRMTToOperators_" - }, - "sessions_request_response_rmt": { - "$ref": "#/components/schemas/Partial_SessionsRequestResponseRMTToOperators_" - } - }, - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "FilterLeafSubset_request_response_rmt-or-sessions_request_response_rmt_": { - "$ref": "#/components/schemas/Pick_FilterLeaf.request_response_rmt-or-sessions_request_response_rmt_" - }, - "SessionFilterNode": { - "anyOf": [ - { - "$ref": "#/components/schemas/FilterLeafSubset_request_response_rmt-or-sessions_request_response_rmt_" - }, - { - "$ref": "#/components/schemas/SessionFilterBranch" - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] - }, - "SessionFilterBranch": { - "properties": { - "right": { - "$ref": "#/components/schemas/SessionFilterNode" - }, - "operator": { - "type": "string", - "enum": [ - "or", - "and" - ] - }, - "left": { - "$ref": "#/components/schemas/SessionFilterNode" - } - }, - "required": [ - "right", - "operator", - "left" - ], - "type": "object" - }, - "SessionQueryParams": { - "properties": { - "search": { - "type": "string" - }, - "timeFilter": { - "properties": { - "endTimeUnixMs": { - "type": "number", - "format": "double" - }, - "startTimeUnixMs": { - "type": "number", - "format": "double" - } - }, - "required": [ - "endTimeUnixMs", - "startTimeUnixMs" - ], - "type": "object" - }, - "nameEquals": { - "type": "string" - }, - "timezoneDifference": { - "type": "number", - "format": "double" - }, - "filter": { - "$ref": "#/components/schemas/SessionFilterNode" - }, - "offset": { - "type": "number", - "format": "double" - }, - "limit": { - "type": "number", - "format": "double" - } - }, - "required": [ - "search", - "timeFilter", - "timezoneDifference", - "filter" - ], - "type": "object", - "additionalProperties": false - }, - "SessionsAggregateMetrics": { - "properties": { - "count": { - "type": "number", - "format": "double" - }, - "total_cost": { - "type": "number", - "format": "double" - }, - "avg_cost": { - "type": "number", - "format": "double" - }, - "avg_latency": { - "type": "number", - "format": "double" - }, - "avg_requests": { - "type": "number", - "format": "double" - } - }, - "required": [ - "count", - "total_cost", - "avg_cost", - "avg_latency", - "avg_requests" - ], - "type": "object", - "additionalProperties": false - }, - "ResultSuccess_SessionsAggregateMetrics_": { + "ResultSuccess_ProviderMetrics_": { "properties": { "data": { - "$ref": "#/components/schemas/SessionsAggregateMetrics" + "$ref": "#/components/schemas/ProviderMetrics" }, "error": { "type": "number", @@ -8192,55 +7934,46 @@ "type": "object", "additionalProperties": false }, - "Result_SessionsAggregateMetrics.string_": { + "Result_ProviderMetrics.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess_SessionsAggregateMetrics_" + "$ref": "#/components/schemas/ResultSuccess_ProviderMetrics_" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "SessionNameResult": { + "TimeFrame": { + "type": "string", + "enum": [ + "24h", + "7d", + "30d" + ] + }, + "ProviderMetric": { "properties": { - "name": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "last_used": { - "type": "string" - }, - "first_used": { + "provider": { "type": "string" }, - "session_count": { - "type": "number", - "format": "double" - }, - "avg_latency": { + "total_requests": { "type": "number", "format": "double" } }, "required": [ - "name", - "created_at", - "last_used", - "first_used", - "session_count", - "avg_latency" + "provider", + "total_requests" ], "type": "object", "additionalProperties": false }, - "ResultSuccess_SessionNameResult-Array_": { + "ResultSuccess_ProviderMetric-Array_": { "properties": { "data": { "items": { - "$ref": "#/components/schemas/SessionNameResult" + "$ref": "#/components/schemas/ProviderMetric" }, "type": "array" }, @@ -8259,748 +7992,270 @@ "type": "object", "additionalProperties": false }, - "Result_SessionNameResult-Array.string_": { + "Result_ProviderMetric-Array.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess_SessionNameResult-Array_" + "$ref": "#/components/schemas/ResultSuccess_ProviderMetric-Array_" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "TimeFilterMs": { + "Partial_UserMetricsToOperators_": { "properties": { - "startTimeUnixMs": { - "type": "number", - "format": "double" + "user_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "endTimeUnixMs": { - "type": "number", - "format": "double" - } - }, - "required": [ - "startTimeUnixMs", - "endTimeUnixMs" - ], - "type": "object", - "additionalProperties": false - }, - "SessionNameQueryParams": { - "properties": { - "nameContains": { - "type": "string" + "last_active": { + "$ref": "#/components/schemas/Partial_TimestampOperators_" }, - "timezoneDifference": { - "type": "number", - "format": "double" + "total_requests": { + "$ref": "#/components/schemas/Partial_NumberOperators_" }, - "pSize": { - "type": "string", - "enum": [ - "p50", - "p75", - "p95", - "p99", - "p99.9" - ] + "active_for": { + "$ref": "#/components/schemas/Partial_NumberOperators_" }, - "useInterquartile": { - "type": "boolean" + "average_requests_per_day_active": { + "$ref": "#/components/schemas/Partial_NumberOperators_" }, - "timeFilter": { - "$ref": "#/components/schemas/TimeFilterMs" + "average_tokens_per_request": { + "$ref": "#/components/schemas/Partial_NumberOperators_" }, - "filter": { - "$ref": "#/components/schemas/SessionFilterNode" + "total_completion_tokens": { + "$ref": "#/components/schemas/Partial_NumberOperators_" + }, + "total_prompt_tokens": { + "$ref": "#/components/schemas/Partial_NumberOperators_" + }, + "cost": { + "$ref": "#/components/schemas/Partial_NumberOperators_" } }, - "required": [ - "nameContains", - "timezoneDifference" - ], "type": "object", - "additionalProperties": false + "description": "Make all properties in T optional" }, - "AverageRow": { + "Partial_UserApiKeysTableToOperators_": { "properties": { - "average": { - "type": "number", - "format": "double" - } - }, - "required": [ - "average" - ], + "api_key_hash": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "api_key_name": { + "$ref": "#/components/schemas/Partial_TextOperators_" + } + }, "type": "object", - "additionalProperties": false + "description": "Make all properties in T optional" }, - "SessionMetrics": { + "Partial_PropertiesTableToOperators_": { "properties": { - "session_count": { - "items": { - "$ref": "#/components/schemas/HistogramRow" - }, - "type": "array" - }, - "session_duration": { - "items": { - "$ref": "#/components/schemas/HistogramRow" - }, - "type": "array" + "auth_hash": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "session_cost": { - "items": { - "$ref": "#/components/schemas/HistogramRow" - }, - "type": "array" + "key": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "average": { - "properties": { - "session_cost": { - "items": { - "$ref": "#/components/schemas/AverageRow" - }, - "type": "array" - }, - "session_duration": { - "items": { - "$ref": "#/components/schemas/AverageRow" - }, - "type": "array" - }, - "session_count": { - "items": { - "$ref": "#/components/schemas/AverageRow" - }, - "type": "array" - } - }, - "required": [ - "session_cost", - "session_duration", - "session_count" - ], - "type": "object" + "value": { + "$ref": "#/components/schemas/Partial_TextOperators_" } }, - "required": [ - "session_count", - "session_duration", - "session_cost", - "average" - ], "type": "object", - "additionalProperties": false + "description": "Make all properties in T optional" }, - "ResultSuccess_SessionMetrics_": { + "Partial_ExperimentToOperators_": { "properties": { - "data": { - "$ref": "#/components/schemas/SessionMetrics" + "id": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true + "prompt_v2": { + "$ref": "#/components/schemas/Partial_TextOperators_" } }, - "required": [ - "data", - "error" - ], "type": "object", - "additionalProperties": false + "description": "Make all properties in T optional" }, - "Result_SessionMetrics.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess_SessionMetrics_" - }, - { - "$ref": "#/components/schemas/ResultError_string_" + "Partial_ExperimentHypothesisRunToOperator_": { + "properties": { + "result_request_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" } - ] + }, + "type": "object", + "description": "Make all properties in T optional" }, - "SessionMetricsQueryParams": { + "Partial_ScoreValueToOperator_": { "properties": { - "nameContains": { - "type": "string" + "request_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" + } + }, + "type": "object", + "description": "Make all properties in T optional" + }, + "Partial_RequestResponseLogToOperators_": { + "properties": { + "latency": { + "$ref": "#/components/schemas/Partial_NumberOperators_" }, - "timezoneDifference": { - "type": "number", - "format": "double" + "status": { + "$ref": "#/components/schemas/Partial_NumberOperators_" }, - "pSize": { - "type": "string", - "enum": [ - "p50", - "p75", - "p95", - "p99", - "p99.9" - ] + "request_created_at": { + "$ref": "#/components/schemas/Partial_TimestampOperatorsTyped_" }, - "useInterquartile": { - "type": "boolean" + "response_created_at": { + "$ref": "#/components/schemas/Partial_TimestampOperatorsTyped_" }, - "timeFilter": { - "$ref": "#/components/schemas/TimeFilterMs" + "auth_hash": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "filter": { - "$ref": "#/components/schemas/SessionFilterNode" + "model": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "user_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "organization_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "node_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "job_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "threat": { + "$ref": "#/components/schemas/Partial_BooleanOperators_" } }, - "required": [ - "nameContains", - "timezoneDifference" - ], "type": "object", - "additionalProperties": false + "description": "Make all properties in T optional" }, - "ResultSuccess_string-or-null_": { + "Partial_PropertiesV3ToOperators_": { "properties": { - "data": { - "type": "string", - "nullable": true + "key": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true + "value": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "organization_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" } }, - "required": [ - "data", - "error" - ], "type": "object", - "additionalProperties": false + "description": "Make all properties in T optional" }, - "Result_string-or-null.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess_string-or-null_" + "Partial_PropertyWithResponseV1ToOperators_": { + "properties": { + "property_key": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - { - "$ref": "#/components/schemas/ResultError_string_" + "property_value": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "request_created_at": { + "$ref": "#/components/schemas/Partial_TimestampOperatorsTyped_" + }, + "organization_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "threat": { + "$ref": "#/components/schemas/Partial_BooleanOperators_" } - ] + }, + "type": "object", + "description": "Make all properties in T optional" }, - "MetricsData": { + "Partial_JobToOperators_": { "properties": { - "totalRequests": { - "type": "number", - "format": "double" + "id": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "requestCountPrevious24h": { - "type": "number", - "format": "double" + "name": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "requestVolumeChange": { - "type": "number", - "format": "double" + "description": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "errorRate24h": { - "type": "number", - "format": "double" + "status": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "errorRatePrevious24h": { - "type": "number", - "format": "double" + "created_at": { + "$ref": "#/components/schemas/Partial_TimestampOperators_" }, - "errorRateChange": { - "type": "number", - "format": "double" + "updated_at": { + "$ref": "#/components/schemas/Partial_TimestampOperators_" }, - "averageLatency": { - "type": "number", - "format": "double" + "timeout_seconds": { + "$ref": "#/components/schemas/Partial_NumberOperators_" }, - "averageLatencyPerToken": { - "type": "number", - "format": "double" - }, - "latencyChange": { - "type": "number", - "format": "double" - }, - "latencyPerTokenChange": { - "type": "number", - "format": "double" - }, - "recentRequestCount": { - "type": "number", - "format": "double" + "custom_properties": { + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "type": "object" }, - "recentErrorCount": { - "type": "number", - "format": "double" + "org_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" } }, - "required": [ - "totalRequests", - "requestCountPrevious24h", - "requestVolumeChange", - "errorRate24h", - "errorRatePrevious24h", - "errorRateChange", - "averageLatency", - "averageLatencyPerToken", - "latencyChange", - "latencyPerTokenChange", - "recentRequestCount", - "recentErrorCount" - ], "type": "object", - "additionalProperties": false + "description": "Make all properties in T optional" }, - "TimeSeriesDataPoint": { + "Partial_NodesToOperators_": { "properties": { - "timestamp": { - "type": "string", - "format": "date-time" - }, - "errorCount": { - "type": "number", - "format": "double" - }, - "requestCount": { - "type": "number", - "format": "double" + "id": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "averageLatency": { - "type": "number", - "format": "double" + "name": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "averageLatencyPerCompletionToken": { - "type": "number", - "format": "double" - } - }, - "required": [ - "timestamp", - "errorCount", - "requestCount", - "averageLatency", - "averageLatencyPerCompletionToken" - ], - "type": "object", - "additionalProperties": false - }, - "ProviderMetrics": { - "properties": { - "providerName": { - "type": "string" + "description": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "metrics": { - "allOf": [ - { - "$ref": "#/components/schemas/MetricsData" - }, - { - "properties": { - "timeSeriesData": { - "items": { - "$ref": "#/components/schemas/TimeSeriesDataPoint" - }, - "type": "array" - } - }, - "required": [ - "timeSeriesData" - ], - "type": "object" - } - ] - } - }, - "required": [ - "providerName", - "metrics" - ], - "type": "object", - "additionalProperties": false - }, - "ResultSuccess_ProviderMetrics-Array_": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/ProviderMetrics" - }, - "type": "array" + "job_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result_ProviderMetrics-Array.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess_ProviderMetrics-Array_" + "status": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "ResultSuccess_ProviderMetrics_": { - "properties": { - "data": { - "$ref": "#/components/schemas/ProviderMetrics" + "created_at": { + "$ref": "#/components/schemas/Partial_TimestampOperators_" }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result_ProviderMetrics.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess_ProviderMetrics_" + "updated_at": { + "$ref": "#/components/schemas/Partial_TimestampOperators_" }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "TimeFrame": { - "type": "string", - "enum": [ - "24h", - "7d", - "30d" - ] - }, - "ProviderMetric": { - "properties": { - "provider": { - "type": "string" + "timeout_seconds": { + "$ref": "#/components/schemas/Partial_NumberOperators_" }, - "total_requests": { - "type": "number", - "format": "double" - } - }, - "required": [ - "provider", - "total_requests" - ], - "type": "object", - "additionalProperties": false - }, - "ResultSuccess_ProviderMetric-Array_": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/ProviderMetric" + "custom_properties": { + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "type": "array" + "type": "object" }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true + "org_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" } }, - "required": [ - "data", - "error" - ], "type": "object", - "additionalProperties": false - }, - "Result_ProviderMetric-Array.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess_ProviderMetric-Array_" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] + "description": "Make all properties in T optional" }, - "Partial_UserMetricsToOperators_": { + "Partial_CacheMetricsTableToOperators_": { "properties": { - "user_id": { + "organization_id": { "$ref": "#/components/schemas/Partial_TextOperators_" }, - "last_active": { - "$ref": "#/components/schemas/Partial_TimestampOperators_" + "request_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "total_requests": { - "$ref": "#/components/schemas/Partial_NumberOperators_" + "date": { + "$ref": "#/components/schemas/Partial_TimestampOperatorsTyped_" }, - "active_for": { - "$ref": "#/components/schemas/Partial_NumberOperators_" - }, - "average_requests_per_day_active": { - "$ref": "#/components/schemas/Partial_NumberOperators_" - }, - "average_tokens_per_request": { - "$ref": "#/components/schemas/Partial_NumberOperators_" - }, - "total_completion_tokens": { - "$ref": "#/components/schemas/Partial_NumberOperators_" - }, - "total_prompt_tokens": { - "$ref": "#/components/schemas/Partial_NumberOperators_" - }, - "cost": { - "$ref": "#/components/schemas/Partial_NumberOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Partial_UserApiKeysTableToOperators_": { - "properties": { - "api_key_hash": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "api_key_name": { - "$ref": "#/components/schemas/Partial_TextOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Partial_PropertiesTableToOperators_": { - "properties": { - "auth_hash": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "key": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "value": { - "$ref": "#/components/schemas/Partial_TextOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Partial_ExperimentToOperators_": { - "properties": { - "id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "prompt_v2": { - "$ref": "#/components/schemas/Partial_TextOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Partial_ExperimentHypothesisRunToOperator_": { - "properties": { - "result_request_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Partial_ScoreValueToOperator_": { - "properties": { - "request_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Partial_RequestResponseLogToOperators_": { - "properties": { - "latency": { - "$ref": "#/components/schemas/Partial_NumberOperators_" - }, - "status": { - "$ref": "#/components/schemas/Partial_NumberOperators_" - }, - "request_created_at": { - "$ref": "#/components/schemas/Partial_TimestampOperatorsTyped_" - }, - "response_created_at": { - "$ref": "#/components/schemas/Partial_TimestampOperatorsTyped_" - }, - "auth_hash": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "model": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "user_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "organization_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "node_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "job_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "threat": { - "$ref": "#/components/schemas/Partial_BooleanOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Partial_PropertiesV3ToOperators_": { - "properties": { - "key": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "value": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "organization_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Partial_PropertyWithResponseV1ToOperators_": { - "properties": { - "property_key": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "property_value": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "request_created_at": { - "$ref": "#/components/schemas/Partial_TimestampOperatorsTyped_" - }, - "organization_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "threat": { - "$ref": "#/components/schemas/Partial_BooleanOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Partial_JobToOperators_": { - "properties": { - "id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "name": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "description": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "status": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "created_at": { - "$ref": "#/components/schemas/Partial_TimestampOperators_" - }, - "updated_at": { - "$ref": "#/components/schemas/Partial_TimestampOperators_" - }, - "timeout_seconds": { - "$ref": "#/components/schemas/Partial_NumberOperators_" - }, - "custom_properties": { - "properties": {}, - "additionalProperties": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "type": "object" - }, - "org_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Partial_NodesToOperators_": { - "properties": { - "id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "name": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "description": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "job_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "status": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "created_at": { - "$ref": "#/components/schemas/Partial_TimestampOperators_" - }, - "updated_at": { - "$ref": "#/components/schemas/Partial_TimestampOperators_" - }, - "timeout_seconds": { - "$ref": "#/components/schemas/Partial_NumberOperators_" - }, - "custom_properties": { - "properties": {}, - "additionalProperties": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "type": "object" - }, - "org_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Partial_CacheMetricsTableToOperators_": { - "properties": { - "organization_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "request_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "date": { - "$ref": "#/components/schemas/Partial_TimestampOperatorsTyped_" - }, - "hour": { + "hour": { "$ref": "#/components/schemas/Partial_NumberOperators_" }, "model": { @@ -9036,1121 +8291,418 @@ "last_hit": { "$ref": "#/components/schemas/Partial_TimestampOperatorsTyped_" }, - "request_body": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "response_body": { - "$ref": "#/components/schemas/Partial_TextOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Partial_RateLimitTableToOperators_": { - "properties": { - "organization_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "created_at": { - "$ref": "#/components/schemas/Partial_TimestampOperatorsTyped_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Partial_OrganizationPropertiesToOperators_": { - "properties": { - "organization_id": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "property_key": { - "$ref": "#/components/schemas/Partial_TextOperators_" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "Partial_TablesAndViews_": { - "properties": { - "user_metrics": { - "$ref": "#/components/schemas/Partial_UserMetricsToOperators_" - }, - "user_api_keys": { - "$ref": "#/components/schemas/Partial_UserApiKeysTableToOperators_" - }, - "response": { - "$ref": "#/components/schemas/Partial_ResponseTableToOperators_" - }, - "request": { - "$ref": "#/components/schemas/Partial_RequestTableToOperators_" - }, - "feedback": { - "$ref": "#/components/schemas/Partial_FeedbackTableToOperators_" - }, - "properties_table": { - "$ref": "#/components/schemas/Partial_PropertiesTableToOperators_" - }, - "prompt_v2": { - "$ref": "#/components/schemas/Partial_PromptToOperators_" - }, - "prompts_versions": { - "$ref": "#/components/schemas/Partial_PromptVersionsToOperators_" - }, - "experiment": { - "$ref": "#/components/schemas/Partial_ExperimentToOperators_" - }, - "experiment_hypothesis_run": { - "$ref": "#/components/schemas/Partial_ExperimentHypothesisRunToOperator_" - }, - "score_value": { - "$ref": "#/components/schemas/Partial_ScoreValueToOperator_" - }, - "request_response_log": { - "$ref": "#/components/schemas/Partial_RequestResponseLogToOperators_" - }, - "request_response_rmt": { - "$ref": "#/components/schemas/Partial_RequestResponseRMTToOperators_" - }, - "sessions_request_response_rmt": { - "$ref": "#/components/schemas/Partial_SessionsRequestResponseRMTToOperators_" - }, - "users_view": { - "$ref": "#/components/schemas/Partial_UserViewToOperators_" - }, - "properties_v3": { - "$ref": "#/components/schemas/Partial_PropertiesV3ToOperators_" - }, - "property_with_response_v1": { - "$ref": "#/components/schemas/Partial_PropertyWithResponseV1ToOperators_" - }, - "job": { - "$ref": "#/components/schemas/Partial_JobToOperators_" - }, - "job_node": { - "$ref": "#/components/schemas/Partial_NodesToOperators_" - }, - "cache_metrics": { - "$ref": "#/components/schemas/Partial_CacheMetricsTableToOperators_" - }, - "rate_limit_log": { - "$ref": "#/components/schemas/Partial_RateLimitTableToOperators_" - }, - "organization_properties": { - "$ref": "#/components/schemas/Partial_OrganizationPropertiesToOperators_" - }, - "properties": { - "properties": {}, - "additionalProperties": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "type": "object" - }, - "values": { - "properties": {}, - "additionalProperties": { - "$ref": "#/components/schemas/Partial_TextOperators_" - }, - "type": "object" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "SingleKey_TablesAndViews_": { - "$ref": "#/components/schemas/Partial_TablesAndViews_" - }, - "FilterLeaf": { - "$ref": "#/components/schemas/SingleKey_TablesAndViews_" - }, - "FilterNode": { - "anyOf": [ - { - "$ref": "#/components/schemas/FilterLeaf" - }, - { - "$ref": "#/components/schemas/FilterBranch" - }, - { - "properties": {}, - "type": "object" - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] - }, - "FilterBranch": { - "properties": { - "left": { - "$ref": "#/components/schemas/FilterNode" - }, - "operator": { - "type": "string", - "enum": [ - "or", - "and" - ] - }, - "right": { - "$ref": "#/components/schemas/FilterNode" - } - }, - "required": [ - "left", - "operator", - "right" - ], - "type": "object", - "additionalProperties": false - }, - "ProviderQueryParams": { - "properties": { - "filter": { - "$ref": "#/components/schemas/FilterNode" - }, - "offset": { - "type": "number", - "format": "double" - }, - "limit": { - "type": "number", - "format": "double" - }, - "timeFilter": { - "properties": { - "end": { - "type": "string" - }, - "start": { - "type": "string" - } - }, - "required": [ - "end", - "start" - ], - "type": "object" - } - }, - "required": [ - "filter", - "offset", - "limit", - "timeFilter" - ], - "type": "object", - "additionalProperties": false - }, - "ResultSuccess__property-string--total_cost-number--request_count-number--created_at_trunc-string_-Array_": { - "properties": { - "data": { - "items": { - "properties": { - "created_at_trunc": { - "type": "string" - }, - "request_count": { - "type": "number", - "format": "double" - }, - "total_cost": { - "type": "number", - "format": "double" - }, - "property": { - "type": "string" - } - }, - "required": [ - "created_at_trunc", - "request_count", - "total_cost", - "property" - ], - "type": "object" - }, - "type": "array" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result__property-string--total_cost-number--request_count-number--created_at_trunc-string_-Array.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess__property-string--total_cost-number--request_count-number--created_at_trunc-string_-Array_" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "Pick_FilterLeaf.request_response_rmt_": { - "properties": { - "request_response_rmt": { - "$ref": "#/components/schemas/Partial_RequestResponseRMTToOperators_" - } - }, - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "FilterLeafSubset_request_response_rmt_": { - "$ref": "#/components/schemas/Pick_FilterLeaf.request_response_rmt_" - }, - "RequestClickhouseFilterNode": { - "anyOf": [ - { - "$ref": "#/components/schemas/FilterLeafSubset_request_response_rmt_" - }, - { - "$ref": "#/components/schemas/RequestClickhouseFilterBranch" - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] - }, - "RequestClickhouseFilterBranch": { - "properties": { - "right": { - "$ref": "#/components/schemas/RequestClickhouseFilterNode" - }, - "operator": { - "type": "string", - "enum": [ - "or", - "and" - ] - }, - "left": { - "$ref": "#/components/schemas/RequestClickhouseFilterNode" - } - }, - "required": [ - "right", - "operator", - "left" - ], - "type": "object" - }, - "TimeIncrement": { - "type": "string", - "enum": [ - "min", - "hour", - "day", - "week", - "month", - "year" - ] - }, - "DataOverTimeRequest": { - "properties": { - "timeFilter": { - "properties": { - "end": { - "type": "string" - }, - "start": { - "type": "string" - } - }, - "required": [ - "end", - "start" - ], - "type": "object" - }, - "userFilter": { - "$ref": "#/components/schemas/RequestClickhouseFilterNode" - }, - "dbIncrement": { - "$ref": "#/components/schemas/TimeIncrement" - }, - "timeZoneDifference": { - "type": "number", - "format": "double" - } - }, - "required": [ - "timeFilter", - "userFilter", - "dbIncrement", - "timeZoneDifference" - ], - "type": "object", - "additionalProperties": false - }, - "Property": { - "properties": { - "property": { - "type": "string" - } - }, - "required": [ - "property" - ], - "type": "object", - "additionalProperties": false - }, - "ResultSuccess_Property-Array_": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/Property" - }, - "type": "array" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result_Property-Array.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess_Property-Array_" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "ResultSuccess_unknown-Array_": { - "properties": { - "data": { - "items": {}, - "type": "array" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "ResultSuccess__value-string--cost-number_-Array_": { - "properties": { - "data": { - "items": { - "properties": { - "cost": { - "type": "number", - "format": "double" - }, - "value": { - "type": "string" - } - }, - "required": [ - "cost", - "value" - ], - "type": "object" - }, - "type": "array" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result__value-string--cost-number_-Array.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess__value-string--cost-number_-Array_" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "TimeFilterRequest": { - "properties": { - "timeFilter": { - "properties": { - "end": { - "type": "string" - }, - "start": { - "type": "string" - } - }, - "required": [ - "end", - "start" - ], - "type": "object" - } - }, - "required": [ - "timeFilter" - ], - "type": "object", - "additionalProperties": false - }, - "ResultSuccess__value-string--count-number_-Array_": { - "properties": { - "data": { - "items": { - "properties": { - "count": { - "type": "number", - "format": "double" - }, - "value": { - "type": "string" - } - }, - "required": [ - "count", - "value" - ], - "type": "object" - }, - "type": "array" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result__value-string--count-number_-Array.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess__value-string--count-number_-Array_" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "ChatCompletionTokenLogprob.TopLogprob": { - "properties": { - "token": { - "type": "string", - "description": "The token." - }, - "bytes": { - "items": { - "type": "number", - "format": "double" - }, - "type": "array", - "nullable": true, - "description": "A list of integers representing the UTF-8 bytes representation of the token.\nUseful in instances where characters are represented by multiple tokens and\ntheir byte representations must be combined to generate the correct text\nrepresentation. Can be `null` if there is no bytes representation for the token." - }, - "logprob": { - "type": "number", - "format": "double", - "description": "The log probability of this token, if it is within the top 20 most likely\ntokens. Otherwise, the value `-9999.0` is used to signify that the token is very\nunlikely." - } - }, - "required": [ - "token", - "bytes", - "logprob" - ], - "type": "object", - "additionalProperties": false - }, - "ChatCompletionTokenLogprob": { - "properties": { - "token": { - "type": "string", - "description": "The token." - }, - "bytes": { - "items": { - "type": "number", - "format": "double" - }, - "type": "array", - "nullable": true, - "description": "A list of integers representing the UTF-8 bytes representation of the token.\nUseful in instances where characters are represented by multiple tokens and\ntheir byte representations must be combined to generate the correct text\nrepresentation. Can be `null` if there is no bytes representation for the token." - }, - "logprob": { - "type": "number", - "format": "double", - "description": "The log probability of this token, if it is within the top 20 most likely\ntokens. Otherwise, the value `-9999.0` is used to signify that the token is very\nunlikely." - }, - "top_logprobs": { - "items": { - "$ref": "#/components/schemas/ChatCompletionTokenLogprob.TopLogprob" - }, - "type": "array", - "description": "List of the most likely tokens and their log probability, at this token\nposition. In rare cases, there may be fewer than the number of requested\n`top_logprobs` returned." - } - }, - "required": [ - "token", - "bytes", - "logprob", - "top_logprobs" - ], - "type": "object", - "additionalProperties": false - }, - "ChatCompletion.Choice.Logprobs": { - "description": "Log probability information for the choice.", - "properties": { - "content": { - "items": { - "$ref": "#/components/schemas/ChatCompletionTokenLogprob" - }, - "type": "array", - "nullable": true, - "description": "A list of message content tokens with log probability information." - }, - "refusal": { - "items": { - "$ref": "#/components/schemas/ChatCompletionTokenLogprob" - }, - "type": "array", - "nullable": true, - "description": "A list of message refusal tokens with log probability information." - } - }, - "required": [ - "content", - "refusal" - ], - "type": "object", - "additionalProperties": false - }, - "ChatCompletionMessage.Annotation.URLCitation": { - "description": "A URL citation when using web search.", - "properties": { - "end_index": { - "type": "number", - "format": "double", - "description": "The index of the last character of the URL citation in the message." - }, - "start_index": { - "type": "number", - "format": "double", - "description": "The index of the first character of the URL citation in the message." - }, - "title": { - "type": "string", - "description": "The title of the web resource." + "request_body": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "url": { - "type": "string", - "description": "The URL of the web resource." + "response_body": { + "$ref": "#/components/schemas/Partial_TextOperators_" } }, - "required": [ - "end_index", - "start_index", - "title", - "url" - ], "type": "object", - "additionalProperties": false + "description": "Make all properties in T optional" }, - "ChatCompletionMessage.Annotation": { - "description": "A URL citation when using web search.", + "Partial_RateLimitTableToOperators_": { "properties": { - "type": { - "type": "string", - "enum": [ - "url_citation" - ], - "nullable": false, - "description": "The type of the URL citation. Always `url_citation`." + "organization_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "url_citation": { - "$ref": "#/components/schemas/ChatCompletionMessage.Annotation.URLCitation", - "description": "A URL citation when using web search." + "created_at": { + "$ref": "#/components/schemas/Partial_TimestampOperatorsTyped_" } }, - "required": [ - "type", - "url_citation" - ], "type": "object", - "additionalProperties": false + "description": "Make all properties in T optional" }, - "ChatCompletionAudio": { - "description": "If the audio output modality is requested, this object contains data about the\naudio response from the model.\n[Learn more](https://platform.openai.com/docs/guides/audio).", + "Partial_OrganizationPropertiesToOperators_": { "properties": { - "id": { - "type": "string", - "description": "Unique identifier for this audio response." - }, - "data": { - "type": "string", - "description": "Base64 encoded audio bytes generated by the model, in the format specified in\nthe request." - }, - "expires_at": { - "type": "number", - "format": "double", - "description": "The Unix timestamp (in seconds) for when this audio response will no longer be\naccessible on the server for use in multi-turn conversations." + "organization_id": { + "$ref": "#/components/schemas/Partial_TextOperators_" }, - "transcript": { - "type": "string", - "description": "Transcript of the audio generated by the model." + "property_key": { + "$ref": "#/components/schemas/Partial_TextOperators_" } }, - "required": [ - "id", - "data", - "expires_at", - "transcript" - ], "type": "object", - "additionalProperties": false + "description": "Make all properties in T optional" }, - "ChatCompletionMessage.FunctionCall": { + "Partial_TablesAndViews_": { "properties": { - "arguments": { - "type": "string", - "description": "The arguments to call the function with, as generated by the model in JSON\nformat. Note that the model does not always generate valid JSON, and may\nhallucinate parameters not defined by your function schema. Validate the\narguments in your code before calling your function." + "user_metrics": { + "$ref": "#/components/schemas/Partial_UserMetricsToOperators_" }, - "name": { - "type": "string", - "description": "The name of the function to call." + "user_api_keys": { + "$ref": "#/components/schemas/Partial_UserApiKeysTableToOperators_" + }, + "response": { + "$ref": "#/components/schemas/Partial_ResponseTableToOperators_" + }, + "request": { + "$ref": "#/components/schemas/Partial_RequestTableToOperators_" + }, + "feedback": { + "$ref": "#/components/schemas/Partial_FeedbackTableToOperators_" + }, + "properties_table": { + "$ref": "#/components/schemas/Partial_PropertiesTableToOperators_" + }, + "prompt_v2": { + "$ref": "#/components/schemas/Partial_PromptToOperators_" + }, + "prompts_versions": { + "$ref": "#/components/schemas/Partial_PromptVersionsToOperators_" + }, + "experiment": { + "$ref": "#/components/schemas/Partial_ExperimentToOperators_" + }, + "experiment_hypothesis_run": { + "$ref": "#/components/schemas/Partial_ExperimentHypothesisRunToOperator_" + }, + "score_value": { + "$ref": "#/components/schemas/Partial_ScoreValueToOperator_" + }, + "request_response_log": { + "$ref": "#/components/schemas/Partial_RequestResponseLogToOperators_" + }, + "request_response_rmt": { + "$ref": "#/components/schemas/Partial_RequestResponseRMTToOperators_" + }, + "sessions_request_response_rmt": { + "$ref": "#/components/schemas/Partial_SessionsRequestResponseRMTToOperators_" + }, + "users_view": { + "$ref": "#/components/schemas/Partial_UserViewToOperators_" + }, + "properties_v3": { + "$ref": "#/components/schemas/Partial_PropertiesV3ToOperators_" + }, + "property_with_response_v1": { + "$ref": "#/components/schemas/Partial_PropertyWithResponseV1ToOperators_" + }, + "job": { + "$ref": "#/components/schemas/Partial_JobToOperators_" + }, + "job_node": { + "$ref": "#/components/schemas/Partial_NodesToOperators_" + }, + "cache_metrics": { + "$ref": "#/components/schemas/Partial_CacheMetricsTableToOperators_" + }, + "rate_limit_log": { + "$ref": "#/components/schemas/Partial_RateLimitTableToOperators_" + }, + "organization_properties": { + "$ref": "#/components/schemas/Partial_OrganizationPropertiesToOperators_" + }, + "properties": { + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "type": "object" + }, + "values": { + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/Partial_TextOperators_" + }, + "type": "object" } }, - "required": [ - "arguments", - "name" - ], "type": "object", - "additionalProperties": false, - "deprecated": true + "description": "Make all properties in T optional" }, - "ChatCompletionMessageFunctionToolCall.Function": { - "description": "The function that the model called.", - "properties": { - "arguments": { - "type": "string", - "description": "The arguments to call the function with, as generated by the model in JSON\nformat. Note that the model does not always generate valid JSON, and may\nhallucinate parameters not defined by your function schema. Validate the\narguments in your code before calling your function." + "SingleKey_TablesAndViews_": { + "$ref": "#/components/schemas/Partial_TablesAndViews_" + }, + "FilterLeaf": { + "$ref": "#/components/schemas/SingleKey_TablesAndViews_" + }, + "FilterNode": { + "anyOf": [ + { + "$ref": "#/components/schemas/FilterLeaf" }, - "name": { + { + "$ref": "#/components/schemas/FilterBranch" + }, + { + "properties": {}, + "type": "object" + }, + { "type": "string", - "description": "The name of the function to call." + "enum": [ + "all" + ] } - }, - "required": [ - "arguments", - "name" - ], - "type": "object", - "additionalProperties": false + ] }, - "ChatCompletionMessageFunctionToolCall": { - "description": "A call to a function tool created by the model.", + "FilterBranch": { "properties": { - "id": { - "type": "string", - "description": "The ID of the tool call." - }, - "function": { - "$ref": "#/components/schemas/ChatCompletionMessageFunctionToolCall.Function", - "description": "The function that the model called." + "left": { + "$ref": "#/components/schemas/FilterNode" }, - "type": { + "operator": { "type": "string", "enum": [ - "function" - ], - "nullable": false, - "description": "The type of the tool. Currently, only `function` is supported." + "or", + "and" + ] + }, + "right": { + "$ref": "#/components/schemas/FilterNode" } }, "required": [ - "id", - "function", - "type" + "left", + "operator", + "right" ], "type": "object", "additionalProperties": false }, - "ChatCompletionMessageCustomToolCall.Custom": { - "description": "The custom tool that the model called.", + "ProviderQueryParams": { "properties": { - "input": { - "type": "string", - "description": "The input for the custom tool call generated by the model." + "filter": { + "$ref": "#/components/schemas/FilterNode" }, - "name": { - "type": "string", - "description": "The name of the custom tool to call." + "offset": { + "type": "number", + "format": "double" + }, + "limit": { + "type": "number", + "format": "double" + }, + "timeFilter": { + "properties": { + "end": { + "type": "string" + }, + "start": { + "type": "string" + } + }, + "required": [ + "end", + "start" + ], + "type": "object" } }, "required": [ - "input", - "name" + "filter", + "offset", + "limit", + "timeFilter" ], "type": "object", "additionalProperties": false }, - "ChatCompletionMessageCustomToolCall": { - "description": "A call to a custom tool created by the model.", + "ResultSuccess__property-string--total_cost-number--request_count-number--created_at_trunc-string_-Array_": { "properties": { - "id": { - "type": "string", - "description": "The ID of the tool call." - }, - "custom": { - "$ref": "#/components/schemas/ChatCompletionMessageCustomToolCall.Custom", - "description": "The custom tool that the model called." + "data": { + "items": { + "properties": { + "created_at_trunc": { + "type": "string" + }, + "request_count": { + "type": "number", + "format": "double" + }, + "total_cost": { + "type": "number", + "format": "double" + }, + "property": { + "type": "string" + } + }, + "required": [ + "created_at_trunc", + "request_count", + "total_cost", + "property" + ], + "type": "object" + }, + "type": "array" }, - "type": { - "type": "string", + "error": { + "type": "number", "enum": [ - "custom" + null ], - "nullable": false, - "description": "The type of the tool. Always `custom`." + "nullable": true } }, "required": [ - "id", - "custom", - "type" + "data", + "error" ], "type": "object", "additionalProperties": false }, - "ChatCompletionMessageToolCall": { + "Result__property-string--total_cost-number--request_count-number--created_at_trunc-string_-Array.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ChatCompletionMessageFunctionToolCall" + "$ref": "#/components/schemas/ResultSuccess__property-string--total_cost-number--request_count-number--created_at_trunc-string_-Array_" }, { - "$ref": "#/components/schemas/ChatCompletionMessageCustomToolCall" + "$ref": "#/components/schemas/ResultError_string_" } - ], - "description": "A call to a function tool created by the model." + ] }, - "ChatCompletionMessage": { - "description": "A chat completion message generated by the model.", + "Pick_FilterLeaf.request_response_rmt_": { "properties": { - "content": { - "type": "string", - "nullable": true, - "description": "The contents of the message." + "request_response_rmt": { + "$ref": "#/components/schemas/Partial_RequestResponseRMTToOperators_" + } + }, + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" + }, + "FilterLeafSubset_request_response_rmt_": { + "$ref": "#/components/schemas/Pick_FilterLeaf.request_response_rmt_" + }, + "RequestClickhouseFilterNode": { + "anyOf": [ + { + "$ref": "#/components/schemas/FilterLeafSubset_request_response_rmt_" }, - "refusal": { - "type": "string", - "nullable": true, - "description": "The refusal message generated by the model." + { + "$ref": "#/components/schemas/RequestClickhouseFilterBranch" }, - "role": { + { "type": "string", "enum": [ - "assistant" - ], - "nullable": false, - "description": "The role of the author of this message." - }, - "annotations": { - "items": { - "$ref": "#/components/schemas/ChatCompletionMessage.Annotation" - }, - "type": "array", - "description": "Annotations for the message, when applicable, as when using the\n[web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat)." - }, - "audio": { - "allOf": [ - { - "$ref": "#/components/schemas/ChatCompletionAudio" - } - ], - "nullable": true, - "description": "If the audio output modality is requested, this object contains data about the\naudio response from the model.\n[Learn more](https://platform.openai.com/docs/guides/audio)." - }, - "function_call": { - "allOf": [ - { - "$ref": "#/components/schemas/ChatCompletionMessage.FunctionCall" - } - ], - "nullable": true, - "deprecated": true - }, - "tool_calls": { - "items": { - "$ref": "#/components/schemas/ChatCompletionMessageToolCall" - }, - "type": "array", - "description": "The tool calls generated by the model, such as function calls." + "all" + ] } - }, - "required": [ - "content", - "refusal", - "role" - ], - "type": "object", - "additionalProperties": false + ] }, - "ChatCompletion.Choice": { + "RequestClickhouseFilterBranch": { "properties": { - "finish_reason": { + "right": { + "$ref": "#/components/schemas/RequestClickhouseFilterNode" + }, + "operator": { "type": "string", "enum": [ - "stop", - "length", - "tool_calls", - "content_filter", - "function_call" - ], - "description": "The reason the model stopped generating tokens. This will be `stop` if the model\nhit a natural stop point or a provided stop sequence, `length` if the maximum\nnumber of tokens specified in the request was reached, `content_filter` if\ncontent was omitted due to a flag from our content filters, `tool_calls` if the\nmodel called a tool, or `function_call` (deprecated) if the model called a\nfunction." - }, - "index": { - "type": "number", - "format": "double", - "description": "The index of the choice in the list of choices." - }, - "logprobs": { - "allOf": [ - { - "$ref": "#/components/schemas/ChatCompletion.Choice.Logprobs" - } - ], - "nullable": true, - "description": "Log probability information for the choice." + "or", + "and" + ] }, - "message": { - "$ref": "#/components/schemas/ChatCompletionMessage", - "description": "A chat completion message generated by the model." + "left": { + "$ref": "#/components/schemas/RequestClickhouseFilterNode" } }, "required": [ - "finish_reason", - "index", - "logprobs", - "message" + "right", + "operator", + "left" ], - "type": "object", - "additionalProperties": false + "type": "object" }, - "CompletionUsage.CompletionTokensDetails": { - "description": "Breakdown of tokens used in a completion.", - "properties": { - "accepted_prediction_tokens": { - "type": "number", - "format": "double", - "description": "When using Predicted Outputs, the number of tokens in the prediction that\nappeared in the completion." - }, - "audio_tokens": { - "type": "number", - "format": "double", - "description": "Audio input tokens generated by the model." - }, - "reasoning_tokens": { - "type": "number", - "format": "double", - "description": "Tokens generated by the model for reasoning." - }, - "rejected_prediction_tokens": { - "type": "number", - "format": "double", - "description": "When using Predicted Outputs, the number of tokens in the prediction that did\nnot appear in the completion. However, like reasoning tokens, these tokens are\nstill counted in the total completion tokens for purposes of billing, output,\nand context window limits." - } - }, - "type": "object", - "additionalProperties": false + "TimeIncrement": { + "type": "string", + "enum": [ + "min", + "hour", + "day", + "week", + "month", + "year" + ] }, - "CompletionUsage.PromptTokensDetails": { - "description": "Breakdown of tokens used in the prompt.", + "DataOverTimeRequest": { "properties": { - "audio_tokens": { - "type": "number", - "format": "double", - "description": "Audio input tokens present in the prompt." + "timeFilter": { + "properties": { + "end": { + "type": "string" + }, + "start": { + "type": "string" + } + }, + "required": [ + "end", + "start" + ], + "type": "object" + }, + "userFilter": { + "$ref": "#/components/schemas/RequestClickhouseFilterNode" }, - "cached_tokens": { + "dbIncrement": { + "$ref": "#/components/schemas/TimeIncrement" + }, + "timeZoneDifference": { "type": "number", - "format": "double", - "description": "Cached tokens present in the prompt." + "format": "double" } }, + "required": [ + "timeFilter", + "userFilter", + "dbIncrement", + "timeZoneDifference" + ], "type": "object", "additionalProperties": false }, - "CompletionUsage": { - "description": "Usage statistics for the completion request.", + "Property": { "properties": { - "completion_tokens": { - "type": "number", - "format": "double", - "description": "Number of tokens in the generated completion." - }, - "prompt_tokens": { - "type": "number", - "format": "double", - "description": "Number of tokens in the prompt." - }, - "total_tokens": { - "type": "number", - "format": "double", - "description": "Total number of tokens used in the request (prompt + completion)." - }, - "completion_tokens_details": { - "$ref": "#/components/schemas/CompletionUsage.CompletionTokensDetails", - "description": "Breakdown of tokens used in a completion." - }, - "prompt_tokens_details": { - "$ref": "#/components/schemas/CompletionUsage.PromptTokensDetails", - "description": "Breakdown of tokens used in the prompt." + "property": { + "type": "string" } }, "required": [ - "completion_tokens", - "prompt_tokens", - "total_tokens" + "property" ], "type": "object", "additionalProperties": false }, - "ChatCompletion": { - "description": "Represents a chat completion response returned by model, based on the provided\ninput.", + "ResultSuccess_Property-Array_": { "properties": { - "id": { - "type": "string", - "description": "A unique identifier for the chat completion." - }, - "choices": { + "data": { "items": { - "$ref": "#/components/schemas/ChatCompletion.Choice" + "$ref": "#/components/schemas/Property" }, - "type": "array", - "description": "A list of chat completion choices. Can be more than one if `n` is greater\nthan 1." + "type": "array" }, - "created": { + "error": { "type": "number", - "format": "double", - "description": "The Unix timestamp (in seconds) of when the chat completion was created." - }, - "model": { - "type": "string", - "description": "The model used for the chat completion." - }, - "object": { - "type": "string", - "enum": [ - "chat.completion" - ], - "nullable": false, - "description": "The object type, which is always `chat.completion`." - }, - "service_tier": { - "type": "string", "enum": [ - "auto", - "default", - "flex", - "scale", - "priority", null ], - "nullable": true, - "description": "Specifies the processing type used for serving the request.\n\n- If set to 'auto', then the request will be processed with the service tier\n configured in the Project settings. Unless otherwise configured, the Project\n will use 'default'.\n- If set to 'default', then the request will be processed with the standard\n pricing and performance for the selected model.\n- If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or\n 'priority', then the request will be processed with the corresponding service\n tier. [Contact sales](https://openai.com/contact-sales) to learn more about\n Priority processing.\n- When not set, the default behavior is 'auto'.\n\nWhen the `service_tier` parameter is set, the response body will include the\n`service_tier` value based on the processing mode actually used to serve the\nrequest. This response value may be different from the value set in the\nparameter." - }, - "system_fingerprint": { - "type": "string", - "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when\nbackend changes have been made that might impact determinism." - }, - "usage": { - "$ref": "#/components/schemas/CompletionUsage", - "description": "Usage statistics for the completion request." + "nullable": true } }, "required": [ - "id", - "choices", - "created", - "model", - "object" + "data", + "error" ], "type": "object", "additionalProperties": false }, - "ResultSuccess_ChatCompletion-or-_content-string--reasoning-string--calls-any__": { + "Result_Property-Array.string_": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess_Property-Array_" + }, + { + "$ref": "#/components/schemas/ResultError_string_" + } + ] + }, + "ResultSuccess_unknown-Array_": { "properties": { "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/ChatCompletion" - }, - { - "properties": { - "calls": {}, - "reasoning": { - "type": "string" - }, - "content": { - "type": "string" - } - }, - "required": [ - "calls", - "reasoning", - "content" - ], - "type": "object" - } - ] + "items": {}, + "type": "array" }, "error": { "type": "number", @@ -10167,28 +8719,26 @@ "type": "object", "additionalProperties": false }, - "Result_ChatCompletion-or-_content-string--reasoning-string--calls-any_.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess_ChatCompletion-or-_content-string--reasoning-string--calls-any__" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, - "ResultSuccess__apiKey-string__": { + "ResultSuccess__value-string--cost-number_-Array_": { "properties": { "data": { - "properties": { - "apiKey": { - "type": "string" - } + "items": { + "properties": { + "cost": { + "type": "number", + "format": "double" + }, + "value": { + "type": "string" + } + }, + "required": [ + "cost", + "value" + ], + "type": "object" }, - "required": [ - "apiKey" - ], - "type": "object" + "type": "array" }, "error": { "type": "number", @@ -10205,32 +8755,56 @@ "type": "object", "additionalProperties": false }, - "Result__apiKey-string_.string_": { + "Result__value-string--cost-number_-Array.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess__apiKey-string__" + "$ref": "#/components/schemas/ResultSuccess__value-string--cost-number_-Array_" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "ResultSuccess__cost-number--created_at_trunc-string_-Array_": { + "TimeFilterRequest": { + "properties": { + "timeFilter": { + "properties": { + "end": { + "type": "string" + }, + "start": { + "type": "string" + } + }, + "required": [ + "end", + "start" + ], + "type": "object" + } + }, + "required": [ + "timeFilter" + ], + "type": "object", + "additionalProperties": false + }, + "ResultSuccess__value-string--count-number_-Array_": { "properties": { "data": { "items": { "properties": { - "created_at_trunc": { - "type": "string" - }, - "cost": { + "count": { "type": "number", "format": "double" + }, + "value": { + "type": "string" } }, "required": [ - "created_at_trunc", - "cost" + "count", + "value" ], "type": "object" }, @@ -10251,747 +8825,671 @@ "type": "object", "additionalProperties": false }, - "Result__cost-number--created_at_trunc-string_-Array.string_": { + "Result__value-string--count-number_-Array.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess__cost-number--created_at_trunc-string_-Array_" + "$ref": "#/components/schemas/ResultSuccess__value-string--count-number_-Array_" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "AuthorName": { - "type": "string", - "enum": [ - "anthropic", - "deepseek", - "mistral", - "openai", - "perplexity", - "xai", - "google", - "meta-llama", - "amazon", - "microsoft", - "nvidia", - "qwen", - "moonshotai", - "alibaba", - "zai", - "baidu", - "passthrough" - ] - }, - "StandardParameter": { - "type": "string", - "enum": [ - "max_tokens", - "max_completion_tokens", - "temperature", - "top_p", - "top_k", - "stop", - "stream", - "frequency_penalty", - "presence_penalty", - "repetition_penalty", - "seed", - "tools", - "tool_choice", - "functions", - "function_call", - "reasoning", - "include_reasoning", - "thinking", - "response_format", - "json_mode", - "truncate", - "min_p", - "logit_bias", - "logprobs", - "top_logprobs", - "structured_outputs", - "verbosity", - "n" - ] - }, - "PluginId": { - "type": "string", - "enum": [ - "web" - ], - "nullable": false - }, - "RateLimits": { + "ChatCompletionTokenLogprob.TopLogprob": { "properties": { - "rpm": { - "type": "number", - "format": "double" + "token": { + "type": "string", + "description": "The token." }, - "tpm": { - "type": "number", - "format": "double" + "bytes": { + "items": { + "type": "number", + "format": "double" + }, + "type": "array", + "nullable": true, + "description": "A list of integers representing the UTF-8 bytes representation of the token.\nUseful in instances where characters are represented by multiple tokens and\ntheir byte representations must be combined to generate the correct text\nrepresentation. Can be `null` if there is no bytes representation for the token." }, - "tpd": { + "logprob": { "type": "number", - "format": "double" + "format": "double", + "description": "The log probability of this token, if it is within the top 20 most likely\ntokens. Otherwise, the value `-9999.0` is used to signify that the token is very\nunlikely." } }, + "required": [ + "token", + "bytes", + "logprob" + ], "type": "object", "additionalProperties": false }, - "ModalityPricing": { - "description": "Per-modality pricing configuration.\nSupports input, cached input (as multiplier), and output rates.", + "ChatCompletionTokenLogprob": { "properties": { - "input": { - "type": "number", - "format": "double" + "token": { + "type": "string", + "description": "The token." }, - "cachedInputMultiplier": { - "type": "number", - "format": "double" + "bytes": { + "items": { + "type": "number", + "format": "double" + }, + "type": "array", + "nullable": true, + "description": "A list of integers representing the UTF-8 bytes representation of the token.\nUseful in instances where characters are represented by multiple tokens and\ntheir byte representations must be combined to generate the correct text\nrepresentation. Can be `null` if there is no bytes representation for the token." }, - "output": { + "logprob": { "type": "number", - "format": "double" + "format": "double", + "description": "The log probability of this token, if it is within the top 20 most likely\ntokens. Otherwise, the value `-9999.0` is used to signify that the token is very\nunlikely." + }, + "top_logprobs": { + "items": { + "$ref": "#/components/schemas/ChatCompletionTokenLogprob.TopLogprob" + }, + "type": "array", + "description": "List of the most likely tokens and their log probability, at this token\nposition. In rare cases, there may be fewer than the number of requested\n`top_logprobs` returned." } }, + "required": [ + "token", + "bytes", + "logprob", + "top_logprobs" + ], "type": "object", "additionalProperties": false }, - "ModelPricing": { + "ChatCompletion.Choice.Logprobs": { + "description": "Log probability information for the choice.", "properties": { - "threshold": { - "type": "number", - "format": "double" - }, - "input": { - "type": "number", - "format": "double" - }, - "output": { - "type": "number", - "format": "double" - }, - "cacheMultipliers": { - "properties": { - "write1h": { - "type": "number", - "format": "double" - }, - "write5m": { - "type": "number", - "format": "double" - }, - "cachedInput": { - "type": "number", - "format": "double" - } + "content": { + "items": { + "$ref": "#/components/schemas/ChatCompletionTokenLogprob" }, - "required": [ - "cachedInput" - ], - "type": "object" - }, - "cacheStoragePerHour": { - "type": "number", - "format": "double" - }, - "thinking": { - "type": "number", - "format": "double" - }, - "request": { - "type": "number", - "format": "double" - }, - "image": { - "$ref": "#/components/schemas/ModalityPricing" - }, - "audio": { - "$ref": "#/components/schemas/ModalityPricing" - }, - "video": { - "$ref": "#/components/schemas/ModalityPricing" - }, - "file": { - "$ref": "#/components/schemas/ModalityPricing" + "type": "array", + "nullable": true, + "description": "A list of message content tokens with log probability information." }, - "web_search": { - "type": "number", - "format": "double" + "refusal": { + "items": { + "$ref": "#/components/schemas/ChatCompletionTokenLogprob" + }, + "type": "array", + "nullable": true, + "description": "A list of message refusal tokens with log probability information." } }, "required": [ - "threshold", - "input", - "output" + "content", + "refusal" ], "type": "object", "additionalProperties": false }, - "BodyMappingType": { - "type": "string", - "enum": [ - "OPENAI", - "NO_MAPPING", - "RESPONSES" - ] - }, - "EndpointConfig": { + "ChatCompletionMessage.Annotation.URLCitation": { + "description": "A URL citation when using web search.", "properties": { - "region": { - "type": "string" - }, - "location": { - "type": "string" - }, - "projectId": { - "type": "string" - }, - "baseUri": { - "type": "string" - }, - "deploymentName": { - "type": "string" - }, - "resourceName": { - "type": "string" - }, - "apiVersion": { - "type": "string" - }, - "crossRegion": { - "type": "boolean" - }, - "gatewayMapping": { - "$ref": "#/components/schemas/BodyMappingType" - }, - "modelName": { - "type": "string" - }, - "heliconeModelId": { - "type": "string" - }, - "providerModelId": { - "type": "string" - }, - "pricing": { - "items": { - "$ref": "#/components/schemas/ModelPricing" - }, - "type": "array" - }, - "contextLength": { + "end_index": { "type": "number", - "format": "double" + "format": "double", + "description": "The index of the last character of the URL citation in the message." }, - "maxCompletionTokens": { + "start_index": { "type": "number", - "format": "double" - }, - "ptbEnabled": { - "type": "boolean" - }, - "version": { - "type": "string" + "format": "double", + "description": "The index of the first character of the URL citation in the message." }, - "rateLimits": { - "$ref": "#/components/schemas/RateLimits" + "title": { + "type": "string", + "description": "The title of the web resource." }, - "priority": { - "type": "number", - "format": "double" + "url": { + "type": "string", + "description": "The URL of the web resource." } }, + "required": [ + "end_index", + "start_index", + "title", + "url" + ], "type": "object", "additionalProperties": false }, - "Record_string.EndpointConfig_": { - "properties": {}, - "additionalProperties": { - "$ref": "#/components/schemas/EndpointConfig" + "ChatCompletionMessage.Annotation": { + "description": "A URL citation when using web search.", + "properties": { + "type": { + "type": "string", + "enum": [ + "url_citation" + ], + "nullable": false, + "description": "The type of the URL citation. Always `url_citation`." + }, + "url_citation": { + "$ref": "#/components/schemas/ChatCompletionMessage.Annotation.URLCitation", + "description": "A URL citation when using web search." + } }, + "required": [ + "type", + "url_citation" + ], "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "ResponseFormat": { - "type": "string", - "enum": [ - "ANTHROPIC", - "OPENAI", - "GOOGLE" - ] + "additionalProperties": false }, - "ModelProviderConfig": { + "ChatCompletionAudio": { + "description": "If the audio output modality is requested, this object contains data about the\naudio response from the model.\n[Learn more](https://platform.openai.com/docs/guides/audio).", "properties": { - "pricing": { - "items": { - "$ref": "#/components/schemas/ModelPricing" - }, - "type": "array" + "id": { + "type": "string", + "description": "Unique identifier for this audio response." }, - "contextLength": { - "type": "number", - "format": "double" + "data": { + "type": "string", + "description": "Base64 encoded audio bytes generated by the model, in the format specified in\nthe request." }, - "maxCompletionTokens": { + "expires_at": { "type": "number", - "format": "double" - }, - "ptbEnabled": { - "type": "boolean" - }, - "version": { - "type": "string" - }, - "unsupportedParameters": { - "items": { - "$ref": "#/components/schemas/StandardParameter" - }, - "type": "array" - }, - "providerModelId": { - "type": "string" - }, - "provider": { - "$ref": "#/components/schemas/ModelProviderName" - }, - "author": { - "$ref": "#/components/schemas/AuthorName" - }, - "supportedParameters": { - "items": { - "$ref": "#/components/schemas/StandardParameter" - }, - "type": "array" - }, - "supportedPlugins": { - "items": { - "$ref": "#/components/schemas/PluginId" - }, - "type": "array" + "format": "double", + "description": "The Unix timestamp (in seconds) for when this audio response will no longer be\naccessible on the server for use in multi-turn conversations." }, - "rateLimits": { - "$ref": "#/components/schemas/RateLimits" + "transcript": { + "type": "string", + "description": "Transcript of the audio generated by the model." + } + }, + "required": [ + "id", + "data", + "expires_at", + "transcript" + ], + "type": "object", + "additionalProperties": false + }, + "ChatCompletionMessage.FunctionCall": { + "properties": { + "arguments": { + "type": "string", + "description": "The arguments to call the function with, as generated by the model in JSON\nformat. Note that the model does not always generate valid JSON, and may\nhallucinate parameters not defined by your function schema. Validate the\narguments in your code before calling your function." }, - "endpointConfigs": { - "$ref": "#/components/schemas/Record_string.EndpointConfig_" + "name": { + "type": "string", + "description": "The name of the function to call." + } + }, + "required": [ + "arguments", + "name" + ], + "type": "object", + "additionalProperties": false, + "deprecated": true + }, + "ChatCompletionMessageFunctionToolCall.Function": { + "description": "The function that the model called.", + "properties": { + "arguments": { + "type": "string", + "description": "The arguments to call the function with, as generated by the model in JSON\nformat. Note that the model does not always generate valid JSON, and may\nhallucinate parameters not defined by your function schema. Validate the\narguments in your code before calling your function." }, - "crossRegion": { - "type": "boolean" + "name": { + "type": "string", + "description": "The name of the function to call." + } + }, + "required": [ + "arguments", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "ChatCompletionMessageFunctionToolCall": { + "description": "A call to a function tool created by the model.", + "properties": { + "id": { + "type": "string", + "description": "The ID of the tool call." }, - "priority": { - "type": "number", - "format": "double" + "function": { + "$ref": "#/components/schemas/ChatCompletionMessageFunctionToolCall.Function", + "description": "The function that the model called." }, - "quantization": { + "type": { "type": "string", "enum": [ - "fp4", - "fp8", - "fp16", - "bf16", - "int4" - ] - }, - "responseFormat": { - "$ref": "#/components/schemas/ResponseFormat" - }, - "requireExplicitRouting": { - "type": "boolean" - }, - "providerModelIdAliases": { - "items": { - "type": "string" - }, - "type": "array" + "function" + ], + "nullable": false, + "description": "The type of the tool. Currently, only `function` is supported." } }, "required": [ - "pricing", - "contextLength", - "maxCompletionTokens", - "ptbEnabled", - "providerModelId", - "provider", - "author", - "supportedParameters", - "endpointConfigs" + "id", + "function", + "type" ], "type": "object", "additionalProperties": false }, - "UserEndpointConfig": { + "ChatCompletionMessageCustomToolCall.Custom": { + "description": "The custom tool that the model called.", "properties": { - "region": { - "type": "string" - }, - "location": { - "type": "string" - }, - "projectId": { - "type": "string" - }, - "baseUri": { - "type": "string" - }, - "deploymentName": { - "type": "string" - }, - "resourceName": { - "type": "string" - }, - "apiVersion": { - "type": "string" - }, - "crossRegion": { - "type": "boolean" - }, - "gatewayMapping": { - "$ref": "#/components/schemas/BodyMappingType" - }, - "modelName": { - "type": "string" + "input": { + "type": "string", + "description": "The input for the custom tool call generated by the model." }, - "heliconeModelId": { - "type": "string" + "name": { + "type": "string", + "description": "The name of the custom tool to call." } }, + "required": [ + "input", + "name" + ], "type": "object", "additionalProperties": false }, - "Endpoint": { + "ChatCompletionMessageCustomToolCall": { + "description": "A call to a custom tool created by the model.", "properties": { - "pricing": { - "items": { - "$ref": "#/components/schemas/ModelPricing" - }, - "type": "array" + "id": { + "type": "string", + "description": "The ID of the tool call." }, - "contextLength": { - "type": "number", - "format": "double" + "custom": { + "$ref": "#/components/schemas/ChatCompletionMessageCustomToolCall.Custom", + "description": "The custom tool that the model called." }, - "maxCompletionTokens": { - "type": "number", - "format": "double" + "type": { + "type": "string", + "enum": [ + "custom" + ], + "nullable": false, + "description": "The type of the tool. Always `custom`." + } + }, + "required": [ + "id", + "custom", + "type" + ], + "type": "object", + "additionalProperties": false + }, + "ChatCompletionMessageToolCall": { + "anyOf": [ + { + "$ref": "#/components/schemas/ChatCompletionMessageFunctionToolCall" }, - "ptbEnabled": { - "type": "boolean" + { + "$ref": "#/components/schemas/ChatCompletionMessageCustomToolCall" + } + ], + "description": "A call to a function tool created by the model." + }, + "ChatCompletionMessage": { + "description": "A chat completion message generated by the model.", + "properties": { + "content": { + "type": "string", + "nullable": true, + "description": "The contents of the message." }, - "version": { - "type": "string" + "refusal": { + "type": "string", + "nullable": true, + "description": "The refusal message generated by the model." + }, + "role": { + "type": "string", + "enum": [ + "assistant" + ], + "nullable": false, + "description": "The role of the author of this message." }, - "unsupportedParameters": { + "annotations": { "items": { - "$ref": "#/components/schemas/StandardParameter" + "$ref": "#/components/schemas/ChatCompletionMessage.Annotation" }, - "type": "array" - }, - "modelConfig": { - "$ref": "#/components/schemas/ModelProviderConfig" - }, - "userConfig": { - "$ref": "#/components/schemas/UserEndpointConfig" - }, - "provider": { - "$ref": "#/components/schemas/ModelProviderName" + "type": "array", + "description": "Annotations for the message, when applicable, as when using the\n[web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat)." }, - "author": { - "$ref": "#/components/schemas/AuthorName" + "audio": { + "allOf": [ + { + "$ref": "#/components/schemas/ChatCompletionAudio" + } + ], + "nullable": true, + "description": "If the audio output modality is requested, this object contains data about the\naudio response from the model.\n[Learn more](https://platform.openai.com/docs/guides/audio)." }, - "providerModelId": { - "type": "string" + "function_call": { + "allOf": [ + { + "$ref": "#/components/schemas/ChatCompletionMessage.FunctionCall" + } + ], + "nullable": true, + "deprecated": true }, - "supportedParameters": { + "tool_calls": { "items": { - "$ref": "#/components/schemas/StandardParameter" + "$ref": "#/components/schemas/ChatCompletionMessageToolCall" }, - "type": "array" - }, - "priority": { - "type": "number", - "format": "double" + "type": "array", + "description": "The tool calls generated by the model, such as function calls." } }, "required": [ - "pricing", - "contextLength", - "maxCompletionTokens", - "ptbEnabled", - "modelConfig", - "userConfig", - "provider", - "author", - "providerModelId", - "supportedParameters" + "content", + "refusal", + "role" ], "type": "object", "additionalProperties": false }, - "SimplifiedModalityPricing": { + "ChatCompletion.Choice": { "properties": { - "input": { - "type": "number", - "format": "double" + "finish_reason": { + "type": "string", + "enum": [ + "stop", + "length", + "tool_calls", + "content_filter", + "function_call" + ], + "description": "The reason the model stopped generating tokens. This will be `stop` if the model\nhit a natural stop point or a provided stop sequence, `length` if the maximum\nnumber of tokens specified in the request was reached, `content_filter` if\ncontent was omitted due to a flag from our content filters, `tool_calls` if the\nmodel called a tool, or `function_call` (deprecated) if the model called a\nfunction." }, - "cachedInput": { + "index": { "type": "number", - "format": "double" + "format": "double", + "description": "The index of the choice in the list of choices." }, - "output": { - "type": "number", - "format": "double" + "logprobs": { + "allOf": [ + { + "$ref": "#/components/schemas/ChatCompletion.Choice.Logprobs" + } + ], + "nullable": true, + "description": "Log probability information for the choice." + }, + "message": { + "$ref": "#/components/schemas/ChatCompletionMessage", + "description": "A chat completion message generated by the model." } }, + "required": [ + "finish_reason", + "index", + "logprobs", + "message" + ], "type": "object", "additionalProperties": false }, - "SimplifiedPricing": { + "CompletionUsage.CompletionTokensDetails": { + "description": "Breakdown of tokens used in a completion.", "properties": { - "prompt": { - "type": "number", - "format": "double" - }, - "completion": { - "type": "number", - "format": "double" - }, - "audio": { - "$ref": "#/components/schemas/SimplifiedModalityPricing" - }, - "thinking": { + "accepted_prediction_tokens": { "type": "number", - "format": "double" + "format": "double", + "description": "When using Predicted Outputs, the number of tokens in the prediction that\nappeared in the completion." }, - "web_search": { + "audio_tokens": { "type": "number", - "format": "double" - }, - "image": { - "$ref": "#/components/schemas/SimplifiedModalityPricing" - }, - "video": { - "$ref": "#/components/schemas/SimplifiedModalityPricing" - }, - "file": { - "$ref": "#/components/schemas/SimplifiedModalityPricing" + "format": "double", + "description": "Audio input tokens generated by the model." }, - "cacheRead": { + "reasoning_tokens": { "type": "number", - "format": "double" + "format": "double", + "description": "Tokens generated by the model for reasoning." }, - "cacheWrite": { + "rejected_prediction_tokens": { "type": "number", - "format": "double" + "format": "double", + "description": "When using Predicted Outputs, the number of tokens in the prediction that did\nnot appear in the completion. However, like reasoning tokens, these tokens are\nstill counted in the total completion tokens for purposes of billing, output,\nand context window limits." + } + }, + "type": "object", + "additionalProperties": false + }, + "CompletionUsage.PromptTokensDetails": { + "description": "Breakdown of tokens used in the prompt.", + "properties": { + "audio_tokens": { + "type": "number", + "format": "double", + "description": "Audio input tokens present in the prompt." }, - "threshold": { + "cached_tokens": { "type": "number", - "format": "double" + "format": "double", + "description": "Cached tokens present in the prompt." } }, - "required": [ - "prompt", - "completion" - ], "type": "object", "additionalProperties": false }, - "ModelEndpoint": { + "CompletionUsage": { + "description": "Usage statistics for the completion request.", "properties": { - "provider": { - "type": "string" - }, - "providerSlug": { - "type": "string" + "completion_tokens": { + "type": "number", + "format": "double", + "description": "Number of tokens in the generated completion." }, - "endpoint": { - "$ref": "#/components/schemas/Endpoint" + "prompt_tokens": { + "type": "number", + "format": "double", + "description": "Number of tokens in the prompt." }, - "supportsPtb": { - "type": "boolean" + "total_tokens": { + "type": "number", + "format": "double", + "description": "Total number of tokens used in the request (prompt + completion)." }, - "pricing": { - "$ref": "#/components/schemas/SimplifiedPricing" + "completion_tokens_details": { + "$ref": "#/components/schemas/CompletionUsage.CompletionTokensDetails", + "description": "Breakdown of tokens used in a completion." }, - "pricingTiers": { - "items": { - "$ref": "#/components/schemas/SimplifiedPricing" - }, - "type": "array" + "prompt_tokens_details": { + "$ref": "#/components/schemas/CompletionUsage.PromptTokensDetails", + "description": "Breakdown of tokens used in the prompt." } }, "required": [ - "provider", - "providerSlug", - "pricing" + "completion_tokens", + "prompt_tokens", + "total_tokens" ], "type": "object", "additionalProperties": false }, - "InputModality": { - "type": "string", - "enum": [ - "text", - "image", - "audio", - "video" - ] - }, - "OutputModality": { - "type": "string", - "enum": [ - "text", - "image", - "audio", - "video" - ] - }, - "ModelRegistryItem": { + "ChatCompletion": { + "description": "Represents a chat completion response returned by model, based on the provided\ninput.", "properties": { "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "contextLength": { - "type": "number", - "format": "double" + "type": "string", + "description": "A unique identifier for the chat completion." }, - "endpoints": { + "choices": { "items": { - "$ref": "#/components/schemas/ModelEndpoint" + "$ref": "#/components/schemas/ChatCompletion.Choice" }, - "type": "array" + "type": "array", + "description": "A list of chat completion choices. Can be more than one if `n` is greater\nthan 1." }, - "maxOutput": { + "created": { "type": "number", - "format": "double" - }, - "trainingDate": { - "type": "string" + "format": "double", + "description": "The Unix timestamp (in seconds) of when the chat completion was created." }, - "description": { - "type": "string" + "model": { + "type": "string", + "description": "The model used for the chat completion." }, - "inputModalities": { - "items": { - "$ref": "#/components/schemas/InputModality" - }, - "type": "array" + "object": { + "type": "string", + "enum": [ + "chat.completion" + ], + "nullable": false, + "description": "The object type, which is always `chat.completion`." }, - "outputModalities": { - "items": { - "$ref": "#/components/schemas/OutputModality" - }, - "type": "array" + "service_tier": { + "type": "string", + "enum": [ + "auto", + "default", + "flex", + "scale", + "priority", + null + ], + "nullable": true, + "description": "Specifies the processing type used for serving the request.\n\n- If set to 'auto', then the request will be processed with the service tier\n configured in the Project settings. Unless otherwise configured, the Project\n will use 'default'.\n- If set to 'default', then the request will be processed with the standard\n pricing and performance for the selected model.\n- If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or\n 'priority', then the request will be processed with the corresponding service\n tier. [Contact sales](https://openai.com/contact-sales) to learn more about\n Priority processing.\n- When not set, the default behavior is 'auto'.\n\nWhen the `service_tier` parameter is set, the response body will include the\n`service_tier` value based on the processing mode actually used to serve the\nrequest. This response value may be different from the value set in the\nparameter." }, - "supportedParameters": { - "items": { - "$ref": "#/components/schemas/StandardParameter" - }, - "type": "array" + "system_fingerprint": { + "type": "string", + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when\nbackend changes have been made that might impact determinism." }, - "pinnedVersionOfModel": { - "type": "string" + "usage": { + "$ref": "#/components/schemas/CompletionUsage", + "description": "Usage statistics for the completion request." } }, "required": [ "id", - "name", - "author", - "contextLength", - "endpoints", - "inputModalities", - "outputModalities", - "supportedParameters" + "choices", + "created", + "model", + "object" ], "type": "object", "additionalProperties": false }, - "ModelCapability": { - "type": "string", - "enum": [ - "audio", - "video", - "image", - "thinking", - "web_search", - "caching", - "reasoning" - ] - }, - "ModelRegistryResponse": { + "ResultSuccess_ChatCompletion-or-_content-string--reasoning-string--calls-any__": { "properties": { - "models": { - "items": { - "$ref": "#/components/schemas/ModelRegistryItem" - }, - "type": "array" + "data": { + "anyOf": [ + { + "$ref": "#/components/schemas/ChatCompletion" + }, + { + "properties": { + "calls": {}, + "reasoning": { + "type": "string" + }, + "content": { + "type": "string" + } + }, + "required": [ + "calls", + "reasoning", + "content" + ], + "type": "object" + } + ] }, - "total": { + "error": { "type": "number", - "format": "double" + "enum": [ + null + ], + "nullable": true + } + }, + "required": [ + "data", + "error" + ], + "type": "object", + "additionalProperties": false + }, + "Result_ChatCompletion-or-_content-string--reasoning-string--calls-any_.string_": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess_ChatCompletion-or-_content-string--reasoning-string--calls-any__" }, - "filters": { + { + "$ref": "#/components/schemas/ResultError_string_" + } + ] + }, + "ResultSuccess__apiKey-string__": { + "properties": { + "data": { "properties": { - "capabilities": { - "items": { - "$ref": "#/components/schemas/ModelCapability" - }, - "type": "array" - }, - "authors": { - "items": { - "type": "string" - }, - "type": "array" - }, - "providers": { - "items": { - "properties": { - "displayName": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "displayName", - "name" - ], - "type": "object" - }, - "type": "array" + "apiKey": { + "type": "string" } }, "required": [ - "capabilities", - "authors", - "providers" + "apiKey" ], "type": "object" + }, + "error": { + "type": "number", + "enum": [ + null + ], + "nullable": true } }, "required": [ - "models", - "total", - "filters" + "data", + "error" ], "type": "object", "additionalProperties": false }, - "ResultSuccess_ModelRegistryResponse_": { + "Result__apiKey-string_.string_": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResultSuccess__apiKey-string__" + }, + { + "$ref": "#/components/schemas/ResultError_string_" + } + ] + }, + "ResultSuccess__cost-number--created_at_trunc-string_-Array_": { "properties": { "data": { - "$ref": "#/components/schemas/ModelRegistryResponse" + "items": { + "properties": { + "created_at_trunc": { + "type": "string" + }, + "cost": { + "type": "number", + "format": "double" + } + }, + "required": [ + "created_at_trunc", + "cost" + ], + "type": "object" + }, + "type": "array" }, "error": { "type": "number", @@ -11008,68 +9506,16 @@ "type": "object", "additionalProperties": false }, - "Result_ModelRegistryResponse.string_": { + "Result__cost-number--created_at_trunc-string_-Array.string_": { "anyOf": [ { - "$ref": "#/components/schemas/ResultSuccess_ModelRegistryResponse_" + "$ref": "#/components/schemas/ResultSuccess__cost-number--created_at_trunc-string_-Array_" }, { "$ref": "#/components/schemas/ResultError_string_" } ] }, - "OAIModel": { - "properties": { - "id": { - "type": "string" - }, - "object": { - "type": "string", - "enum": [ - "model" - ], - "nullable": false - }, - "created": { - "type": "number", - "format": "double" - }, - "owned_by": { - "type": "string" - } - }, - "required": [ - "id", - "object", - "created", - "owned_by" - ], - "type": "object", - "additionalProperties": false - }, - "OAIModelsResponse": { - "properties": { - "object": { - "type": "string", - "enum": [ - "list" - ], - "nullable": false - }, - "data": { - "items": { - "$ref": "#/components/schemas/OAIModel" - }, - "type": "array" - } - }, - "required": [ - "object", - "data" - ], - "type": "object", - "additionalProperties": false - }, "MetricStats": { "properties": { "p99": { @@ -12206,44 +10652,6 @@ "type": "object", "additionalProperties": false }, - "ResultSuccess__unsafe-boolean__": { - "properties": { - "data": { - "properties": { - "unsafe": { - "type": "boolean" - } - }, - "required": [ - "unsafe" - ], - "type": "object" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result__unsafe-boolean_.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess__unsafe-boolean__" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, "ClickHouseTableColumn": { "properties": { "name": { @@ -14773,68 +13181,6 @@ } ] }, - "ResultSuccess__id-number--active-boolean--title-string--message-string--created_at-string--updated_at-string_-Array_": { - "properties": { - "data": { - "items": { - "properties": { - "updated_at": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "message": { - "type": "string" - }, - "title": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "id": { - "type": "number", - "format": "double" - } - }, - "required": [ - "updated_at", - "created_at", - "message", - "title", - "active", - "id" - ], - "type": "object" - }, - "type": "array" - }, - "error": { - "type": "number", - "enum": [ - null - ], - "nullable": true - } - }, - "required": [ - "data", - "error" - ], - "type": "object", - "additionalProperties": false - }, - "Result__id-number--active-boolean--title-string--message-string--created_at-string--updated_at-string_-Array.string_": { - "anyOf": [ - { - "$ref": "#/components/schemas/ResultSuccess__id-number--active-boolean--title-string--message-string--created_at-string--updated_at-string_-Array_" - }, - { - "$ref": "#/components/schemas/ResultError_string_" - } - ] - }, "InAppThread": { "properties": { "id": { @@ -20840,221 +19186,72 @@ "security": [ { "api_key": [] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookData" - } - } - } - } - }, - "get": { - "operationId": "GetWebhooks", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result__id-string--created_at-string--destination-string--version-string--config-string--hmac_key-string_-Array.string_" - } - } - } - } - }, - "tags": [ - "Webhooks" - ], - "security": [ - { - "api_key": [] - } - ], - "parameters": [] - } - }, - "/v1/webhooks/{webhookId}": { - "delete": { - "operationId": "DeleteWebhook", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result_null.string_" - } - } - } - } - }, - "tags": [ - "Webhooks" - ], - "security": [ - { - "api_key": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "webhookId", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/webhooks/{webhookId}/test": { - "post": { - "operationId": "TestWebhook", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result__success-boolean--message-string_.string_" - } - } - } - } - }, - "tags": [ - "Webhooks" - ], - "security": [ - { - "api_key": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "webhookId", - "required": true, - "schema": { - "type": "string" - } - } - ] - } - }, - "/v1/public/waitlist/feature": { - "post": { - "operationId": "AddToWaitlist", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result__success-boolean--position_63_-number--alreadyOnList_63_-boolean--sharedPlatforms_63_-string-Array_.string_" - } - } - } - } - }, - "tags": [ - "Waitlist" + } ], - "security": [], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "properties": { - "feature": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "required": [ - "feature", - "email" - ], - "type": "object" + "$ref": "#/components/schemas/WebhookData" } } } } - } - }, - "/v1/public/waitlist/feature/status": { + }, "get": { - "operationId": "IsOnWaitlist", + "operationId": "GetWebhooks", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__isOnWaitlist-boolean_.string_" + "$ref": "#/components/schemas/Result__id-string--created_at-string--destination-string--version-string--config-string--hmac_key-string_-Array.string_" } } } } }, "tags": [ - "Waitlist" + "Webhooks" ], - "security": [], - "parameters": [ - { - "in": "query", - "name": "email", - "required": true, - "schema": { - "type": "string" - } - }, + "security": [ { - "in": "query", - "name": "feature", - "required": true, - "schema": { - "type": "string" - } + "api_key": [] } - ] + ], + "parameters": [] } }, - "/v1/public/waitlist/feature/count": { - "get": { - "operationId": "GetWaitlistCount", + "/v1/webhooks/{webhookId}": { + "delete": { + "operationId": "DeleteWebhook", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__count-number_.string_" + "$ref": "#/components/schemas/Result_null.string_" } } } } }, "tags": [ - "Waitlist" + "Webhooks" + ], + "security": [ + { + "api_key": [] + } ], - "security": [], "parameters": [ { - "in": "query", - "name": "feature", + "in": "path", + "name": "webhookId", "required": true, "schema": { "type": "string" @@ -21063,56 +19260,39 @@ ] } }, - "/v1/public/waitlist/feature/share": { + "/v1/webhooks/{webhookId}/test": { "post": { - "operationId": "TrackShare", + "operationId": "TestWebhook", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result__success-boolean--newPosition_63_-number--message-string_.string_" + "$ref": "#/components/schemas/Result__success-boolean--message-string_.string_" } } } } }, "tags": [ - "Waitlist" + "Webhooks" ], - "security": [], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "platform": { - "type": "string", - "enum": [ - "twitter", - "linkedin" - ] - }, - "feature": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "required": [ - "platform", - "feature", - "email" - ], - "type": "object" - } + "security": [ + { + "api_key": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "webhookId", + "required": true, + "schema": { + "type": "string" } } - } + ] } }, "/v1/vault/add": { @@ -21492,316 +19672,91 @@ "operationId": "LogTrace", "responses": { "204": { - "description": "No content" - } - }, - "tags": [ - "Trace" - ], - "security": [ - { - "api_key": [] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OTELTrace" - } - } - } - } - } - }, - "/v1/trace/log-python": { - "post": { - "operationId": "LogPythonTrace", - "responses": { - "204": { - "description": "No content" - } - }, - "tags": [ - "Trace" - ], - "security": [ - { - "api_key": [] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": {} - } - } - } - } - }, - "/v1/test/gateway-request": { - "post": { - "operationId": "SendTestRequest", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendTestRequestResponse" - } - } - } - } - }, - "tags": [ - "Test" - ], - "security": [ - { - "api_key": [] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SendTestRequestRequest" - } - } - } - } - } - }, - "/v1/public/stats/model-usage": { - "get": { - "operationId": "GetModelUsage", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result_ModelUsageResponse.string_" - } - } - } - } - }, - "description": "Get model usage statistics for the AI Gateway.\nReturns time series data and a leaderboard of top models by total tokens.", - "tags": [ - "Stats" - ], - "security": [], - "parameters": [ - { - "description": "Time range: \"24h\", \"7d\", \"30d\", \"3m\", or \"1y\"", - "in": "query", - "name": "timeframe", - "required": false, - "schema": { - "$ref": "#/components/schemas/StatsTimeFrame" - } - } - ] - } - }, - "/v1/public/stats/market-share": { - "get": { - "operationId": "GetMarketShare", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result_MarketShareResponse.string_" - } - } - } - } - }, - "description": "Get market share statistics by model author for the AI Gateway.\nReturns time series data (100% stacked) and a leaderboard of top 9 authors + others.", - "tags": [ - "Stats" - ], - "security": [], - "parameters": [ - { - "description": "Time range: \"24h\", \"7d\", \"30d\", \"3m\", or \"1y\"", - "in": "query", - "name": "timeframe", - "required": false, - "schema": { - "$ref": "#/components/schemas/StatsTimeFrame" - } - } - ] - } - }, - "/v1/public/stats/provider-usage": { - "get": { - "operationId": "GetProviderUsage", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result_ProviderUsageResponse.string_" - } - } - } - } - }, - "description": "Get provider usage statistics for the AI Gateway.\nReturns time series data and a leaderboard of top 9 providers + others.", - "tags": [ - "Stats" - ], - "security": [], - "parameters": [ - { - "description": "Time range: \"24h\", \"7d\", \"30d\", \"3m\", or \"1y\"", - "in": "query", - "name": "timeframe", - "required": false, - "schema": { - "$ref": "#/components/schemas/StatsTimeFrame" - } - } - ] - } - }, - "/v1/public/stats/authors/{author}": { - "get": { - "operationId": "GetAuthorStats", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result_AuthorStatsResponse.string_" - } - } - } + "description": "No content" } }, - "description": "Get statistics for a specific model author.\nReturns time series data and a leaderboard of top models by that author.", "tags": [ - "Stats" + "Trace" ], - "security": [], - "parameters": [ - { - "description": "The author identifier (e.g., \"openai\", \"anthropic\")", - "in": "path", - "name": "author", - "required": true, - "schema": { - "type": "string" - } - }, + "security": [ { - "description": "Time range: \"24h\", \"7d\", \"30d\", \"3m\", or \"1y\"", - "in": "query", - "name": "timeframe", - "required": false, - "schema": { - "$ref": "#/components/schemas/StatsTimeFrame" + "api_key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OTELTrace" + } } } - ] + } } }, - "/v1/public/stats/providers/{provider}": { - "get": { - "operationId": "GetProviderStats", + "/v1/trace/log-python": { + "post": { + "operationId": "LogPythonTrace", "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result_ProviderStatsResponse.string_" - } - } - } + "204": { + "description": "No content" } }, - "description": "Get statistics for a specific inference provider.\nReturns time series data and a leaderboard of top models on that provider.", "tags": [ - "Stats" + "Trace" ], - "security": [], - "parameters": [ - { - "description": "The provider identifier (e.g., \"openai\", \"anthropic\")", - "in": "path", - "name": "provider", - "required": true, - "schema": { - "type": "string" - } - }, + "security": [ { - "description": "Time range: \"24h\", \"7d\", \"30d\", \"3m\", or \"1y\"", - "in": "query", - "name": "timeframe", - "required": false, - "schema": { - "$ref": "#/components/schemas/StatsTimeFrame" + "api_key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": {} } } - ] + } } }, - "/v1/public/stats/models/{model}": { - "get": { - "operationId": "GetModelStats", + "/v1/test/gateway-request": { + "post": { + "operationId": "SendTestRequest", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Result_ModelStatsResponse.string_" + "$ref": "#/components/schemas/SendTestRequestResponse" } } } } }, - "description": "Get usage statistics for a specific model.\nReturns time series data showing token usage over time.", "tags": [ - "Stats" + "Test" ], - "security": [], - "parameters": [ - { - "description": "The model identifier (e.g., \"gpt-4\", \"claude-3-opus\")", - "in": "path", - "name": "model", - "required": true, - "schema": { - "type": "string" - } - }, + "security": [ { - "description": "Time range: \"24h\", \"7d\", \"30d\", \"3m\", or \"1y\"", - "in": "query", - "name": "timeframe", - "required": false, - "schema": { - "$ref": "#/components/schemas/StatsTimeFrame" + "api_key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendTestRequestRequest" + } } } - ] + } } }, "/v1/session/query": { @@ -22933,149 +20888,6 @@ } } }, - "/v1/public/model-registry/models": { - "get": { - "operationId": "GetModelRegistry", - "responses": { - "200": { - "description": "Complete model registry with models and filter options", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result_ModelRegistryResponse.string_" - }, - "examples": { - "Example 1": { - "value": { - "models": [ - { - "id": "claude-opus-4-1", - "name": "Anthropic: Claude Opus 4.1", - "author": "anthropic", - "contextLength": 200000, - "endpoints": [ - { - "provider": "anthropic", - "providerSlug": "anthropic", - "supportsPtb": true, - "pricing": { - "prompt": 15, - "completion": 75, - "cacheRead": 1.5, - "cacheWrite": 18.75 - } - } - ], - "maxOutput": 32000, - "trainingDate": "2025-08-05", - "description": "Most capable Claude model with extended context", - "inputModalities": [ - null - ], - "outputModalities": [ - null - ], - "supportedParameters": [ - null, - null, - null, - null, - null, - null, - null - ] - } - ], - "total": 150, - "filters": { - "providers": [ - { - "name": "anthropic", - "displayName": "Anthropic" - }, - { - "name": "openai", - "displayName": "OpenAI" - }, - { - "name": "google", - "displayName": "Google" - } - ], - "authors": [ - "anthropic", - "openai", - "google", - "meta" - ], - "capabilities": [ - "audio", - "image", - "thinking", - "caching", - "reasoning" - ] - } - } - } - } - } - } - } - }, - "description": "Get all available models from the registry", - "summary": "Returns a comprehensive list of all AI models with their configurations, pricing, and capabilities", - "tags": [ - "Model Registry" - ], - "security": [], - "parameters": [] - } - }, - "/v1/models": { - "get": { - "operationId": "GetModels", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAIModelsResponse" - } - } - } - } - }, - "tags": [ - "Models" - ], - "security": [], - "parameters": [] - } - }, - "/v1/models/multimodal": { - "get": { - "operationId": "GetMultimodalModels", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAIModelsResponse" - } - } - } - } - }, - "tags": [ - "Models" - ], - "security": [], - "parameters": [] - } - }, "/v1/public/compare/models": { "post": { "operationId": "GetModelComparison", @@ -23835,50 +21647,6 @@ } } }, - "/v1/public/security": { - "post": { - "operationId": "GetSecurity", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result__unsafe-boolean_.string_" - } - } - } - } - }, - "tags": [ - "Security" - ], - "security": [], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "text": { - "type": "string" - }, - "advanced": { - "type": "boolean" - } - }, - "required": [ - "text", - "advanced" - ], - "type": "object" - } - } - } - } - } - }, "/v1/helicone-sql/schema": { "get": { "operationId": "GetClickHouseSchema", @@ -26348,71 +24116,6 @@ "parameters": [] } }, - "/v1/public/alert-banner": { - "patch": { - "operationId": "UpdateAlertBannerActive", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result_void.string_" - } - } - } - } - }, - "tags": [ - "AdminAlertBanner" - ], - "security": [], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "active": { - "type": "boolean" - }, - "id": { - "type": "number", - "format": "double" - } - }, - "required": [ - "active", - "id" - ], - "type": "object" - } - } - } - } - }, - "get": { - "operationId": "GetAlertBanners", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Result__id-number--active-boolean--title-string--message-string--created_at-string--updated_at-string_-Array.string_" - } - } - } - } - }, - "tags": [ - "AdminAlertBanner" - ], - "security": [], - "parameters": [] - } - }, "/v1/agent/generate": { "post": { "operationId": "Generate", diff --git a/web/lib/clients/jawnTypes/public.ts b/web/lib/clients/jawnTypes/public.ts index 2c358cab4c..829f779f83 100644 --- a/web/lib/clients/jawnTypes/public.ts +++ b/web/lib/clients/jawnTypes/public.ts @@ -385,18 +385,6 @@ export interface paths { "/v1/webhooks/{webhookId}/test": { post: operations["TestWebhook"]; }; - "/v1/public/waitlist/feature": { - post: operations["AddToWaitlist"]; - }; - "/v1/public/waitlist/feature/status": { - get: operations["IsOnWaitlist"]; - }; - "/v1/public/waitlist/feature/count": { - get: operations["GetWaitlistCount"]; - }; - "/v1/public/waitlist/feature/share": { - post: operations["TrackShare"]; - }; "/v1/vault/add": { post: operations["AddKey"]; }; @@ -436,48 +424,6 @@ export interface paths { "/v1/test/gateway-request": { post: operations["SendTestRequest"]; }; - "/v1/public/stats/model-usage": { - /** - * @description Get model usage statistics for the AI Gateway. - * Returns time series data and a leaderboard of top models by total tokens. - */ - get: operations["GetModelUsage"]; - }; - "/v1/public/stats/market-share": { - /** - * @description Get market share statistics by model author for the AI Gateway. - * Returns time series data (100% stacked) and a leaderboard of top 9 authors + others. - */ - get: operations["GetMarketShare"]; - }; - "/v1/public/stats/provider-usage": { - /** - * @description Get provider usage statistics for the AI Gateway. - * Returns time series data and a leaderboard of top 9 providers + others. - */ - get: operations["GetProviderUsage"]; - }; - "/v1/public/stats/authors/{author}": { - /** - * @description Get statistics for a specific model author. - * Returns time series data and a leaderboard of top models by that author. - */ - get: operations["GetAuthorStats"]; - }; - "/v1/public/stats/providers/{provider}": { - /** - * @description Get statistics for a specific inference provider. - * Returns time series data and a leaderboard of top models on that provider. - */ - get: operations["GetProviderStats"]; - }; - "/v1/public/stats/models/{model}": { - /** - * @description Get usage statistics for a specific model. - * Returns time series data showing token usage over time. - */ - get: operations["GetModelStats"]; - }; "/v1/session/query": { post: operations["GetSessions"]; }; @@ -555,19 +501,6 @@ export interface paths { "/v1/pi/costs-over-time/query": { post: operations["GetCostsOverTime"]; }; - "/v1/public/model-registry/models": { - /** - * Returns a comprehensive list of all AI models with their configurations, pricing, and capabilities - * @description Get all available models from the registry - */ - get: operations["GetModelRegistry"]; - }; - "/v1/models": { - get: operations["GetModels"]; - }; - "/v1/models/multimodal": { - get: operations["GetMultimodalModels"]; - }; "/v1/public/compare/models": { post: operations["GetModelComparison"]; }; @@ -631,9 +564,6 @@ export interface paths { "/v1/metrics/quantiles": { post: operations["GetQuantiles"]; }; - "/v1/public/security": { - post: operations["GetSecurity"]; - }; "/v1/helicone-sql/schema": { /** * Get database schema @@ -830,10 +760,6 @@ export interface paths { "/v1/credits/discounts": { get: operations["GetDiscounts"]; }; - "/v1/public/alert-banner": { - get: operations["GetAlertBanners"]; - patch: operations["UpdateAlertBannerActive"]; - }; "/v1/agent/generate": { post: operations["Generate"]; }; @@ -2473,46 +2399,6 @@ export interface components { error: null; }; "Result__success-boolean--message-string_.string_": components["schemas"]["ResultSuccess__success-boolean--message-string__"] | components["schemas"]["ResultError_string_"]; - "ResultSuccess__success-boolean--position_63_-number--alreadyOnList_63_-boolean--sharedPlatforms_63_-string-Array__": { - data: { - sharedPlatforms?: string[]; - alreadyOnList?: boolean; - /** Format: double */ - position?: number; - success: boolean; - }; - /** @enum {number|null} */ - error: null; - }; - "Result__success-boolean--position_63_-number--alreadyOnList_63_-boolean--sharedPlatforms_63_-string-Array_.string_": components["schemas"]["ResultSuccess__success-boolean--position_63_-number--alreadyOnList_63_-boolean--sharedPlatforms_63_-string-Array__"] | components["schemas"]["ResultError_string_"]; - "ResultSuccess__isOnWaitlist-boolean__": { - data: { - isOnWaitlist: boolean; - }; - /** @enum {number|null} */ - error: null; - }; - "Result__isOnWaitlist-boolean_.string_": components["schemas"]["ResultSuccess__isOnWaitlist-boolean__"] | components["schemas"]["ResultError_string_"]; - "ResultSuccess__count-number__": { - data: { - /** Format: double */ - count: number; - }; - /** @enum {number|null} */ - error: null; - }; - "Result__count-number_.string_": components["schemas"]["ResultSuccess__count-number__"] | components["schemas"]["ResultError_string_"]; - "ResultSuccess__success-boolean--newPosition_63_-number--message-string__": { - data: { - message: string; - /** Format: double */ - newPosition?: number; - success: boolean; - }; - /** @enum {number|null} */ - error: null; - }; - "Result__success-boolean--newPosition_63_-number--message-string_.string_": components["schemas"]["ResultSuccess__success-boolean--newPosition_63_-number--message-string__"] | components["schemas"]["ResultError_string_"]; AddVaultKeyParams: { key: string; provider: string; @@ -2756,142 +2642,6 @@ export interface components { SendTestRequestRequest: { apiKey: string; }; - ModelTokens: { - model: string; - /** Format: double */ - totalTokens: number; - }; - ModelUsageTimeSeriesDataPoint: { - time: string; - models: components["schemas"]["ModelTokens"][]; - }; - ModelUsageLeaderboardEntry: { - /** Format: double */ - rank: number; - model: string; - author: string; - /** Format: double */ - totalTokens: number; - /** Format: double */ - percentChange: number | null; - }; - ModelUsageResponse: { - timeSeries: components["schemas"]["ModelUsageTimeSeriesDataPoint"][]; - leaderboard: components["schemas"]["ModelUsageLeaderboardEntry"][]; - }; - ResultSuccess_ModelUsageResponse_: { - data: components["schemas"]["ModelUsageResponse"]; - /** @enum {number|null} */ - error: null; - }; - "Result_ModelUsageResponse.string_": components["schemas"]["ResultSuccess_ModelUsageResponse_"] | components["schemas"]["ResultError_string_"]; - /** @enum {string} */ - StatsTimeFrame: "24h" | "7d" | "30d" | "3m" | "1y"; - AuthorTokens: { - author: string; - /** Format: double */ - totalTokens: number; - /** Format: double */ - percentage: number; - }; - MarketShareTimeSeriesDataPoint: { - time: string; - authors: components["schemas"]["AuthorTokens"][]; - }; - MarketShareLeaderboardEntry: { - /** Format: double */ - rank: number; - author: string; - /** Format: double */ - totalTokens: number; - /** Format: double */ - marketShare: number; - /** Format: double */ - rankChange: number | null; - /** Format: double */ - marketShareChange: number | null; - }; - MarketShareResponse: { - timeSeries: components["schemas"]["MarketShareTimeSeriesDataPoint"][]; - leaderboard: components["schemas"]["MarketShareLeaderboardEntry"][]; - }; - ResultSuccess_MarketShareResponse_: { - data: components["schemas"]["MarketShareResponse"]; - /** @enum {number|null} */ - error: null; - }; - "Result_MarketShareResponse.string_": components["schemas"]["ResultSuccess_MarketShareResponse_"] | components["schemas"]["ResultError_string_"]; - ProviderTokens: { - provider: string; - /** Format: double */ - totalTokens: number; - }; - ProviderUsageTimeSeriesDataPoint: { - time: string; - providers: components["schemas"]["ProviderTokens"][]; - }; - ProviderUsageLeaderboardEntry: { - /** Format: double */ - rank: number; - provider: string; - /** Format: double */ - totalTokens: number; - /** Format: double */ - percentChange: number | null; - }; - ProviderUsageResponse: { - timeSeries: components["schemas"]["ProviderUsageTimeSeriesDataPoint"][]; - leaderboard: components["schemas"]["ProviderUsageLeaderboardEntry"][]; - }; - ResultSuccess_ProviderUsageResponse_: { - data: components["schemas"]["ProviderUsageResponse"]; - /** @enum {number|null} */ - error: null; - }; - "Result_ProviderUsageResponse.string_": components["schemas"]["ResultSuccess_ProviderUsageResponse_"] | components["schemas"]["ResultError_string_"]; - AuthorStatsResponse: { - author: string; - /** Format: double */ - totalTokens: number; - timeSeries: components["schemas"]["ModelUsageTimeSeriesDataPoint"][]; - leaderboard: components["schemas"]["ModelUsageLeaderboardEntry"][]; - }; - ResultSuccess_AuthorStatsResponse_: { - data: components["schemas"]["AuthorStatsResponse"]; - /** @enum {number|null} */ - error: null; - }; - "Result_AuthorStatsResponse.string_": components["schemas"]["ResultSuccess_AuthorStatsResponse_"] | components["schemas"]["ResultError_string_"]; - ProviderStatsResponse: { - provider: string; - /** Format: double */ - totalTokens: number; - timeSeries: components["schemas"]["ModelUsageTimeSeriesDataPoint"][]; - leaderboard: components["schemas"]["ModelUsageLeaderboardEntry"][]; - }; - ResultSuccess_ProviderStatsResponse_: { - data: components["schemas"]["ProviderStatsResponse"]; - /** @enum {number|null} */ - error: null; - }; - "Result_ProviderStatsResponse.string_": components["schemas"]["ResultSuccess_ProviderStatsResponse_"] | components["schemas"]["ResultError_string_"]; - ModelStatsTimeSeriesDataPoint: { - time: string; - /** Format: double */ - totalTokens: number; - }; - ModelStatsResponse: { - model: string; - /** Format: double */ - totalTokens: number; - timeSeries: components["schemas"]["ModelStatsTimeSeriesDataPoint"][]; - }; - ResultSuccess_ModelStatsResponse_: { - data: components["schemas"]["ModelStatsResponse"]; - /** @enum {number|null} */ - error: null; - }; - "Result_ModelStatsResponse.string_": components["schemas"]["ResultSuccess_ModelStatsResponse_"] | components["schemas"]["ResultError_string_"]; SessionResult: { created_at: string; latest_request_created_at: string; @@ -3701,238 +3451,6 @@ export interface components { error: null; }; "Result__cost-number--created_at_trunc-string_-Array.string_": components["schemas"]["ResultSuccess__cost-number--created_at_trunc-string_-Array_"] | components["schemas"]["ResultError_string_"]; - /** @enum {string} */ - AuthorName: "anthropic" | "deepseek" | "mistral" | "openai" | "perplexity" | "xai" | "google" | "meta-llama" | "amazon" | "microsoft" | "nvidia" | "qwen" | "moonshotai" | "alibaba" | "zai" | "baidu" | "passthrough"; - /** @enum {string} */ - StandardParameter: "max_tokens" | "max_completion_tokens" | "temperature" | "top_p" | "top_k" | "stop" | "stream" | "frequency_penalty" | "presence_penalty" | "repetition_penalty" | "seed" | "tools" | "tool_choice" | "functions" | "function_call" | "reasoning" | "include_reasoning" | "thinking" | "response_format" | "json_mode" | "truncate" | "min_p" | "logit_bias" | "logprobs" | "top_logprobs" | "structured_outputs" | "verbosity" | "n"; - /** @enum {string} */ - PluginId: "web"; - RateLimits: { - /** Format: double */ - rpm?: number; - /** Format: double */ - tpm?: number; - /** Format: double */ - tpd?: number; - }; - /** - * @description Per-modality pricing configuration. - * Supports input, cached input (as multiplier), and output rates. - */ - ModalityPricing: { - /** Format: double */ - input?: number; - /** Format: double */ - cachedInputMultiplier?: number; - /** Format: double */ - output?: number; - }; - ModelPricing: { - /** Format: double */ - threshold: number; - /** Format: double */ - input: number; - /** Format: double */ - output: number; - cacheMultipliers?: { - /** Format: double */ - write1h?: number; - /** Format: double */ - write5m?: number; - /** Format: double */ - cachedInput: number; - }; - /** Format: double */ - cacheStoragePerHour?: number; - /** Format: double */ - thinking?: number; - /** Format: double */ - request?: number; - image?: components["schemas"]["ModalityPricing"]; - audio?: components["schemas"]["ModalityPricing"]; - video?: components["schemas"]["ModalityPricing"]; - file?: components["schemas"]["ModalityPricing"]; - /** Format: double */ - web_search?: number; - }; - /** @enum {string} */ - BodyMappingType: "OPENAI" | "NO_MAPPING" | "RESPONSES"; - EndpointConfig: { - region?: string; - location?: string; - projectId?: string; - baseUri?: string; - deploymentName?: string; - resourceName?: string; - apiVersion?: string; - crossRegion?: boolean; - gatewayMapping?: components["schemas"]["BodyMappingType"]; - modelName?: string; - heliconeModelId?: string; - providerModelId?: string; - pricing?: components["schemas"]["ModelPricing"][]; - /** Format: double */ - contextLength?: number; - /** Format: double */ - maxCompletionTokens?: number; - ptbEnabled?: boolean; - version?: string; - rateLimits?: components["schemas"]["RateLimits"]; - /** Format: double */ - priority?: number; - }; - /** @description Construct a type with a set of properties K of type T */ - "Record_string.EndpointConfig_": { - [key: string]: components["schemas"]["EndpointConfig"]; - }; - /** @enum {string} */ - ResponseFormat: "ANTHROPIC" | "OPENAI" | "GOOGLE"; - ModelProviderConfig: { - pricing: components["schemas"]["ModelPricing"][]; - /** Format: double */ - contextLength: number; - /** Format: double */ - maxCompletionTokens: number; - ptbEnabled: boolean; - version?: string; - unsupportedParameters?: components["schemas"]["StandardParameter"][]; - providerModelId: string; - provider: components["schemas"]["ModelProviderName"]; - author: components["schemas"]["AuthorName"]; - supportedParameters: components["schemas"]["StandardParameter"][]; - supportedPlugins?: components["schemas"]["PluginId"][]; - rateLimits?: components["schemas"]["RateLimits"]; - endpointConfigs: components["schemas"]["Record_string.EndpointConfig_"]; - crossRegion?: boolean; - /** Format: double */ - priority?: number; - /** @enum {string} */ - quantization?: "fp4" | "fp8" | "fp16" | "bf16" | "int4"; - responseFormat?: components["schemas"]["ResponseFormat"]; - requireExplicitRouting?: boolean; - providerModelIdAliases?: string[]; - }; - UserEndpointConfig: { - region?: string; - location?: string; - projectId?: string; - baseUri?: string; - deploymentName?: string; - resourceName?: string; - apiVersion?: string; - crossRegion?: boolean; - gatewayMapping?: components["schemas"]["BodyMappingType"]; - modelName?: string; - heliconeModelId?: string; - }; - Endpoint: { - pricing: components["schemas"]["ModelPricing"][]; - /** Format: double */ - contextLength: number; - /** Format: double */ - maxCompletionTokens: number; - ptbEnabled: boolean; - version?: string; - unsupportedParameters?: components["schemas"]["StandardParameter"][]; - modelConfig: components["schemas"]["ModelProviderConfig"]; - userConfig: components["schemas"]["UserEndpointConfig"]; - provider: components["schemas"]["ModelProviderName"]; - author: components["schemas"]["AuthorName"]; - providerModelId: string; - supportedParameters: components["schemas"]["StandardParameter"][]; - /** Format: double */ - priority?: number; - }; - SimplifiedModalityPricing: { - /** Format: double */ - input?: number; - /** Format: double */ - cachedInput?: number; - /** Format: double */ - output?: number; - }; - SimplifiedPricing: { - /** Format: double */ - prompt: number; - /** Format: double */ - completion: number; - audio?: components["schemas"]["SimplifiedModalityPricing"]; - /** Format: double */ - thinking?: number; - /** Format: double */ - web_search?: number; - image?: components["schemas"]["SimplifiedModalityPricing"]; - video?: components["schemas"]["SimplifiedModalityPricing"]; - file?: components["schemas"]["SimplifiedModalityPricing"]; - /** Format: double */ - cacheRead?: number; - /** Format: double */ - cacheWrite?: number; - /** Format: double */ - threshold?: number; - }; - ModelEndpoint: { - provider: string; - providerSlug: string; - endpoint?: components["schemas"]["Endpoint"]; - supportsPtb?: boolean; - pricing: components["schemas"]["SimplifiedPricing"]; - pricingTiers?: components["schemas"]["SimplifiedPricing"][]; - }; - /** @enum {string} */ - InputModality: "text" | "image" | "audio" | "video"; - /** @enum {string} */ - OutputModality: "text" | "image" | "audio" | "video"; - ModelRegistryItem: { - id: string; - name: string; - author: string; - /** Format: double */ - contextLength: number; - endpoints: components["schemas"]["ModelEndpoint"][]; - /** Format: double */ - maxOutput?: number; - trainingDate?: string; - description?: string; - inputModalities: components["schemas"]["InputModality"][]; - outputModalities: components["schemas"]["OutputModality"][]; - supportedParameters: components["schemas"]["StandardParameter"][]; - pinnedVersionOfModel?: string; - }; - /** @enum {string} */ - ModelCapability: "audio" | "video" | "image" | "thinking" | "web_search" | "caching" | "reasoning"; - ModelRegistryResponse: { - models: components["schemas"]["ModelRegistryItem"][]; - /** Format: double */ - total: number; - filters: { - capabilities: components["schemas"]["ModelCapability"][]; - authors: string[]; - providers: { - displayName: string; - name: string; - }[]; - }; - }; - ResultSuccess_ModelRegistryResponse_: { - data: components["schemas"]["ModelRegistryResponse"]; - /** @enum {number|null} */ - error: null; - }; - "Result_ModelRegistryResponse.string_": components["schemas"]["ResultSuccess_ModelRegistryResponse_"] | components["schemas"]["ResultError_string_"]; - OAIModel: { - id: string; - /** @enum {string} */ - object: "model"; - /** Format: double */ - created: number; - owned_by: string; - }; - OAIModelsResponse: { - /** @enum {string} */ - object: "list"; - data: components["schemas"]["OAIModel"][]; - }; MetricStats: { /** Format: double */ p99: number; @@ -4225,14 +3743,6 @@ export interface components { timeZoneDifference: number; metric: string; }; - "ResultSuccess__unsafe-boolean__": { - data: { - unsafe: boolean; - }; - /** @enum {number|null} */ - error: null; - }; - "Result__unsafe-boolean_.string_": components["schemas"]["ResultSuccess__unsafe-boolean__"] | components["schemas"]["ResultError_string_"]; ClickHouseTableColumn: { name: string; type: string; @@ -4842,20 +4352,6 @@ export interface components { error: null; }; "Result_OrgDiscount-Array.string_": components["schemas"]["ResultSuccess_OrgDiscount-Array_"] | components["schemas"]["ResultError_string_"]; - "ResultSuccess__id-number--active-boolean--title-string--message-string--created_at-string--updated_at-string_-Array_": { - data: { - updated_at: string; - created_at: string; - message: string; - title: string; - active: boolean; - /** Format: double */ - id: number; - }[]; - /** @enum {number|null} */ - error: null; - }; - "Result__id-number--active-boolean--title-string--message-string--created_at-string--updated_at-string_-Array.string_": components["schemas"]["ResultSuccess__id-number--active-boolean--title-string--message-string--created_at-string--updated_at-string_-Array_"] | components["schemas"]["ResultError_string_"]; InAppThread: { id: string; chat: unknown; @@ -7134,75 +6630,6 @@ export interface operations { }; }; }; - AddToWaitlist: { - requestBody: { - content: { - "application/json": { - feature: string; - email: string; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__success-boolean--position_63_-number--alreadyOnList_63_-boolean--sharedPlatforms_63_-string-Array_.string_"]; - }; - }; - }; - }; - IsOnWaitlist: { - parameters: { - query: { - email: string; - feature: string; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__isOnWaitlist-boolean_.string_"]; - }; - }; - }; - }; - GetWaitlistCount: { - parameters: { - query: { - feature: string; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__count-number_.string_"]; - }; - }; - }; - }; - TrackShare: { - requestBody: { - content: { - "application/json": { - /** @enum {string} */ - platform: "twitter" | "linkedin"; - feature: string; - email: string; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__success-boolean--newPosition_63_-number--message-string_.string_"]; - }; - }; - }; - }; AddKey: { requestBody: { content: { @@ -7398,138 +6825,6 @@ export interface operations { }; }; }; - /** - * @description Get model usage statistics for the AI Gateway. - * Returns time series data and a leaderboard of top models by total tokens. - */ - GetModelUsage: { - parameters: { - query?: { - /** @description Time range: "24h", "7d", "30d", "3m", or "1y" */ - timeframe?: components["schemas"]["StatsTimeFrame"]; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_ModelUsageResponse.string_"]; - }; - }; - }; - }; - /** - * @description Get market share statistics by model author for the AI Gateway. - * Returns time series data (100% stacked) and a leaderboard of top 9 authors + others. - */ - GetMarketShare: { - parameters: { - query?: { - /** @description Time range: "24h", "7d", "30d", "3m", or "1y" */ - timeframe?: components["schemas"]["StatsTimeFrame"]; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_MarketShareResponse.string_"]; - }; - }; - }; - }; - /** - * @description Get provider usage statistics for the AI Gateway. - * Returns time series data and a leaderboard of top 9 providers + others. - */ - GetProviderUsage: { - parameters: { - query?: { - /** @description Time range: "24h", "7d", "30d", "3m", or "1y" */ - timeframe?: components["schemas"]["StatsTimeFrame"]; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_ProviderUsageResponse.string_"]; - }; - }; - }; - }; - /** - * @description Get statistics for a specific model author. - * Returns time series data and a leaderboard of top models by that author. - */ - GetAuthorStats: { - parameters: { - query?: { - /** @description Time range: "24h", "7d", "30d", "3m", or "1y" */ - timeframe?: components["schemas"]["StatsTimeFrame"]; - }; - path: { - /** @description The author identifier (e.g., "openai", "anthropic") */ - author: string; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_AuthorStatsResponse.string_"]; - }; - }; - }; - }; - /** - * @description Get statistics for a specific inference provider. - * Returns time series data and a leaderboard of top models on that provider. - */ - GetProviderStats: { - parameters: { - query?: { - /** @description Time range: "24h", "7d", "30d", "3m", or "1y" */ - timeframe?: components["schemas"]["StatsTimeFrame"]; - }; - path: { - /** @description The provider identifier (e.g., "openai", "anthropic") */ - provider: string; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_ProviderStatsResponse.string_"]; - }; - }; - }; - }; - /** - * @description Get usage statistics for a specific model. - * Returns time series data showing token usage over time. - */ - GetModelStats: { - parameters: { - query?: { - /** @description Time range: "24h", "7d", "30d", "3m", or "1y" */ - timeframe?: components["schemas"]["StatsTimeFrame"]; - }; - path: { - /** @description The model identifier (e.g., "gpt-4", "claude-3-opus") */ - model: string; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_ModelStatsResponse.string_"]; - }; - }; - }; - }; GetSessions: { requestBody: { content: { @@ -7967,40 +7262,6 @@ export interface operations { }; }; }; - /** - * Returns a comprehensive list of all AI models with their configurations, pricing, and capabilities - * @description Get all available models from the registry - */ - GetModelRegistry: { - responses: { - /** @description Complete model registry with models and filter options */ - 200: { - content: { - "application/json": components["schemas"]["Result_ModelRegistryResponse.string_"]; - }; - }; - }; - }; - GetModels: { - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["OAIModelsResponse"]; - }; - }; - }; - }; - GetMultimodalModels: { - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["OAIModelsResponse"]; - }; - }; - }; - }; GetModelComparison: { requestBody: { content: { @@ -8301,24 +7562,6 @@ export interface operations { }; }; }; - GetSecurity: { - requestBody: { - content: { - "application/json": { - text: string; - advanced: boolean; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__unsafe-boolean_.string_"]; - }; - }; - }; - }; /** * Get database schema * @description Get ClickHouse schema (tables and columns) @@ -9302,35 +8545,6 @@ export interface operations { }; }; }; - GetAlertBanners: { - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result__id-number--active-boolean--title-string--message-string--created_at-string--updated_at-string_-Array.string_"]; - }; - }; - }; - }; - UpdateAlertBannerActive: { - requestBody: { - content: { - "application/json": { - active: boolean; - /** Format: double */ - id: number; - }; - }; - }; - responses: { - /** @description Ok */ - 200: { - content: { - "application/json": components["schemas"]["Result_void.string_"]; - }; - }; - }; - }; UpsertThreadMessage: { parameters: { path: {