UNPKG

@cotofe/service-of-litellm

Version:

OpenAPI client for @cotofe/service-of-litellm

161 lines (160 loc) 12.8 kB
/** * Platform * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { KeyListResponseObject, PassThroughEndpointResponse, PassThroughGenericEndpoint, ProviderBudgetResponse } from '../models/index'; import * as runtime from '../runtime'; export interface LitellmApiCreatePassThroughEndpointsConfigPassThroughEndpointPostRequest { passThroughGenericEndpoint?: PassThroughGenericEndpoint; } export interface LitellmApiDeletePassThroughEndpointsConfigPassThroughEndpointDeleteRequest { endpointId: string; } export interface LitellmApiGetPassThroughEndpointsConfigPassThroughEndpointGetRequest { endpointId?: string | null; } export interface LitellmApiListAvailableTeamsTeamAvailableGetRequest { responseModel?: string; } export interface LitellmApiListKeysKeyListGetRequest { page?: number; size?: number; userId?: string | null; teamId?: string | null; organizationId?: string | null; keyAlias?: string | null; returnFullObject?: boolean; includeTeamKeys?: boolean; } export interface LitellmApiModelInfoV1V1ModelInfoGetRequest { litellmModelId?: string | null; } export interface LitellmApiModelListV1ModelsGetRequest { returnWildcardRoutes?: boolean | null; teamId?: string | null; } export interface LitellmApiUpdatePassThroughEndpointsConfigPassThroughEndpointEndpointIdPostRequest { endpointId: string; } /** * */ export declare class LitellmApi extends runtime.BaseAPI { /** * Create new pass-through endpoint * Create Pass Through Endpoints */ createPassThroughEndpointsConfigPassThroughEndpointPostRaw(requestParameters: LitellmApiCreatePassThroughEndpointsConfigPassThroughEndpointPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>; /** * Create new pass-through endpoint * Create Pass Through Endpoints */ createPassThroughEndpointsConfigPassThroughEndpointPost(requestParameters?: LitellmApiCreatePassThroughEndpointsConfigPassThroughEndpointPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>; /** * Delete a pass-through endpoint Returns - the deleted endpoint * Delete Pass Through Endpoints */ deletePassThroughEndpointsConfigPassThroughEndpointDeleteRaw(requestParameters: LitellmApiDeletePassThroughEndpointsConfigPassThroughEndpointDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PassThroughEndpointResponse>>; /** * Delete a pass-through endpoint Returns - the deleted endpoint * Delete Pass Through Endpoints */ deletePassThroughEndpointsConfigPassThroughEndpointDelete(requestParameters: LitellmApiDeletePassThroughEndpointsConfigPassThroughEndpointDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PassThroughEndpointResponse>; /** * GET configured pass through endpoint. If no endpoint_id given, return all configured endpoints. * Get Pass Through Endpoints */ getPassThroughEndpointsConfigPassThroughEndpointGetRaw(requestParameters: LitellmApiGetPassThroughEndpointsConfigPassThroughEndpointGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PassThroughEndpointResponse>>; /** * GET configured pass through endpoint. If no endpoint_id given, return all configured endpoints. * Get Pass Through Endpoints */ getPassThroughEndpointsConfigPassThroughEndpointGet(requestParameters?: LitellmApiGetPassThroughEndpointsConfigPassThroughEndpointGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PassThroughEndpointResponse>; /** * Get a list of available routes in the FastAPI application. * Get Routes */ getRoutesRoutesGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>; /** * Get a list of available routes in the FastAPI application. * Get Routes */ getRoutesRoutesGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>; /** * * Home */ homeGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>; /** * * Home */ homeGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>; /** * * List Available Teams */ listAvailableTeamsTeamAvailableGetRaw(requestParameters: LitellmApiListAvailableTeamsTeamAvailableGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>; /** * * List Available Teams */ listAvailableTeamsTeamAvailableGet(requestParameters?: LitellmApiListAvailableTeamsTeamAvailableGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>; /** * List all keys for a given user / team / organization. Returns: { \"keys\": List[str] or List[UserAPIKeyAuth], \"total_count\": int, \"current_page\": int, \"total_pages\": int, } * List Keys */ listKeysKeyListGetRaw(requestParameters: LitellmApiListKeysKeyListGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<KeyListResponseObject>>; /** * List all keys for a given user / team / organization. Returns: { \"keys\": List[str] or List[UserAPIKeyAuth], \"total_count\": int, \"current_page\": int, \"total_pages\": int, } * List Keys */ listKeysKeyListGet(requestParameters?: LitellmApiListKeysKeyListGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<KeyListResponseObject>; /** * Provides more info about each model in /models, including config.yaml descriptions (except api key and api base) Parameters: litellm_model_id: Optional[str] = None (this is the value of `x-litellm-model-id` returned in response headers) - When litellm_model_id is passed, it will return the info for that specific model - When litellm_model_id is not passed, it will return the info for all models Returns: Returns a dictionary containing information about each model. Example Response: ```json { \"data\": [ { \"model_name\": \"fake-openai-endpoint\", \"litellm_params\": { \"api_base\": \"https://exampleopenaiendpoint-production.up.railway.app/\", \"model\": \"openai/fake\" }, \"model_info\": { \"id\": \"112f74fab24a7a5245d2ced3536dd8f5f9192c57ee6e332af0f0512e08bed5af\", \"db_model\": false } } ] } ``` * Model Info V1 */ modelInfoV1V1ModelInfoGetRaw(requestParameters: LitellmApiModelInfoV1V1ModelInfoGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>; /** * Provides more info about each model in /models, including config.yaml descriptions (except api key and api base) Parameters: litellm_model_id: Optional[str] = None (this is the value of `x-litellm-model-id` returned in response headers) - When litellm_model_id is passed, it will return the info for that specific model - When litellm_model_id is not passed, it will return the info for all models Returns: Returns a dictionary containing information about each model. Example Response: ```json { \"data\": [ { \"model_name\": \"fake-openai-endpoint\", \"litellm_params\": { \"api_base\": \"https://exampleopenaiendpoint-production.up.railway.app/\", \"model\": \"openai/fake\" }, \"model_info\": { \"id\": \"112f74fab24a7a5245d2ced3536dd8f5f9192c57ee6e332af0f0512e08bed5af\", \"db_model\": false } } ] } ``` * Model Info V1 */ modelInfoV1V1ModelInfoGet(requestParameters?: LitellmApiModelInfoV1V1ModelInfoGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>; /** * Use `/model/info` - to get detailed model information, example - pricing, mode, etc. This is just for compatibility with openai projects like aider. * Model List */ modelListV1ModelsGetRaw(requestParameters: LitellmApiModelListV1ModelsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>; /** * Use `/model/info` - to get detailed model information, example - pricing, mode, etc. This is just for compatibility with openai projects like aider. * Model List */ modelListV1ModelsGet(requestParameters?: LitellmApiModelListV1ModelsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>; /** * Provider Budget Routing - Get Budget, Spend Details https://docs.litellm.ai/docs/proxy/provider_budget_routing Use this endpoint to check current budget, spend and budget reset time for a provider Example Request ```bash curl -X GET http://localhost:4000/provider/budgets -H \"Content-Type: application/json\" -H \"Authorization: Bearer sk-1234\" ``` Example Response ```json { \"providers\": { \"openai\": { \"budget_limit\": 1e-12, \"time_period\": \"1d\", \"spend\": 0.0, \"budget_reset_at\": null }, \"azure\": { \"budget_limit\": 100.0, \"time_period\": \"1d\", \"spend\": 0.0, \"budget_reset_at\": null }, \"anthropic\": { \"budget_limit\": 100.0, \"time_period\": \"10d\", \"spend\": 0.0, \"budget_reset_at\": null }, \"vertex_ai\": { \"budget_limit\": 100.0, \"time_period\": \"12d\", \"spend\": 0.0, \"budget_reset_at\": null } } } ``` * Provider Budgets */ providerBudgetsProviderBudgetsGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProviderBudgetResponse>>; /** * Provider Budget Routing - Get Budget, Spend Details https://docs.litellm.ai/docs/proxy/provider_budget_routing Use this endpoint to check current budget, spend and budget reset time for a provider Example Request ```bash curl -X GET http://localhost:4000/provider/budgets -H \"Content-Type: application/json\" -H \"Authorization: Bearer sk-1234\" ``` Example Response ```json { \"providers\": { \"openai\": { \"budget_limit\": 1e-12, \"time_period\": \"1d\", \"spend\": 0.0, \"budget_reset_at\": null }, \"azure\": { \"budget_limit\": 100.0, \"time_period\": \"1d\", \"spend\": 0.0, \"budget_reset_at\": null }, \"anthropic\": { \"budget_limit\": 100.0, \"time_period\": \"10d\", \"spend\": 0.0, \"budget_reset_at\": null }, \"vertex_ai\": { \"budget_limit\": 100.0, \"time_period\": \"12d\", \"spend\": 0.0, \"budget_reset_at\": null } } } ``` * Provider Budgets */ providerBudgetsProviderBudgetsGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProviderBudgetResponse>; /** * Update a pass-through endpoint * Update Pass Through Endpoints */ updatePassThroughEndpointsConfigPassThroughEndpointEndpointIdPostRaw(requestParameters: LitellmApiUpdatePassThroughEndpointsConfigPassThroughEndpointEndpointIdPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>; /** * Update a pass-through endpoint * Update Pass Through Endpoints */ updatePassThroughEndpointsConfigPassThroughEndpointEndpointIdPost(requestParameters: LitellmApiUpdatePassThroughEndpointsConfigPassThroughEndpointEndpointIdPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>; }