mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Add openai compatible provider
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
export type ApiProvider = "anthropic" | "openrouter" | "bedrock" | "vertex"
|
||||
export type ApiProvider = "anthropic" | "openrouter" | "bedrock" | "vertex" | "openai"
|
||||
|
||||
export interface ApiHandlerOptions {
|
||||
apiModelId?: ApiModelId
|
||||
apiModelId?: string
|
||||
apiKey?: string // anthropic
|
||||
openRouterApiKey?: string
|
||||
awsAccessKey?: string
|
||||
@@ -10,6 +10,9 @@ export interface ApiHandlerOptions {
|
||||
awsRegion?: string
|
||||
vertexProjectId?: string
|
||||
vertexRegion?: string
|
||||
openAiBaseUrl?: string
|
||||
openAiApiKey?: string
|
||||
openAiModelId?: string
|
||||
}
|
||||
|
||||
export type ApiConfiguration = ApiHandlerOptions & {
|
||||
@@ -29,8 +32,6 @@ export interface ModelInfo {
|
||||
cacheReadsPrice?: number
|
||||
}
|
||||
|
||||
export type ApiModelId = AnthropicModelId | OpenRouterModelId | BedrockModelId | VertexModelId
|
||||
|
||||
// Anthropic
|
||||
// https://docs.anthropic.com/en/docs/about-claude/models
|
||||
export type AnthropicModelId = keyof typeof anthropicModels
|
||||
@@ -292,3 +293,12 @@ export const vertexModels = {
|
||||
outputPrice: 1.25,
|
||||
},
|
||||
} as const satisfies Record<string, ModelInfo>
|
||||
|
||||
export const openAiModelInfoSaneDefaults: ModelInfo = {
|
||||
maxTokens: -1,
|
||||
contextWindow: 128_000,
|
||||
supportsImages: true,
|
||||
supportsPromptCache: false,
|
||||
inputPrice: 0,
|
||||
outputPrice: 0,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user