Skip to content

Commit cc7c03e

Browse files
ctemrubens
authored andcommitted
DRY this up
1 parent d5ee39f commit cc7c03e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/shared/api.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import { ModelInfo, ProviderName, ProviderSettings } from "../schemas"
2+
import { REASONING_MODELS } from "../api/providers/constants"
3+
4+
export { REASONING_MODELS }
25

36
export type { ModelInfo, ProviderName as ApiProvider }
47

@@ -77,6 +80,7 @@ export const anthropicModels = {
7780
cacheReadsPrice: 0.03,
7881
},
7982
} as const satisfies Record<string, ModelInfo> // as const assertion makes the object deeply readonly
83+
8084
// Amazon Bedrock
8185
// https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html
8286
export interface MessageContent {
@@ -950,6 +954,7 @@ export const mistralModels = {
950954
} as const satisfies Record<string, ModelInfo>
951955

952956
// Unbound Security
957+
// https://www.unboundsecurity.ai/ai-gateway
953958
export const unboundDefaultModelId = "anthropic/claude-3-5-sonnet-20241022"
954959
export const unboundDefaultModelInfo: ModelInfo = {
955960
maxTokens: 8192,

webview-ui/src/components/settings/constants.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ import {
99
openAiNativeModels,
1010
vertexModels,
1111
xaiModels,
12+
REASONING_MODELS,
1213
} from "../../../../src/shared/api"
1314

15+
export { REASONING_MODELS }
16+
1417
export const MODELS_BY_PROVIDER: Partial<Record<ApiProvider, Record<string, ModelInfo>>> = {
1518
anthropic: anthropicModels,
1619
bedrock: bedrockModels,
@@ -49,5 +52,3 @@ export const VERTEX_REGIONS = [
4952
{ value: "europe-west4", label: "europe-west4" },
5053
{ value: "asia-southeast1", label: "asia-southeast1" },
5154
]
52-
53-
export const REASONING_MODELS = new Set(["x-ai/grok-3-mini-beta", "grok-3-mini-beta", "grok-3-mini-fast-beta"])

0 commit comments

Comments
 (0)