-\t\t\t\t
{
-\t\t\t\t\t\tsetShowAdvanced(checked)
-\t\t\t\t\t\tif (!checked) {
-\t\t\t\t\t\t\tsetApiConfigurationField("azureDeploymentName", "")
-\t\t\t\t\t\t\tsetApiConfigurationField("azureApiVersion", "")
-\t\t\t\t\t\t}
-\t\t\t\t\t}}>
-\t\t\t\t\t{t("settings:providers.azureShowAdvanced")}
-\t\t\t\t
-\t\t\t\t{showAdvanced && (
-\t\t\t\t\t<>
-\t\t\t\t\t\t
-\t\t\t\t\t\t\t
-\t\t\t\t\t\t
-\t\t\t\t\t\t
-\t\t\t\t\t\t\t{t("settings:providers.azureDeploymentNameHint")}
-\t\t\t\t\t\t
+
+
{
+ setShowAdvanced(checked)
+ if (!checked) {
+ setApiConfigurationField("azureDeploymentName", "")
+ setApiConfigurationField("azureApiVersion", "")
+ }
+ }}>
+ {t("settings:providers.azureShowAdvanced")}
+
+ {showAdvanced && (
+ <>
+
+
+
+
+ {t("settings:providers.azureDeploymentNameHint")}
+
-\t\t\t\t\t\t
-\t\t\t\t\t\t\t
-\t\t\t\t\t\t
-\t\t\t\t\t\t
-\t\t\t\t\t\t\t{t("settings:providers.azureApiVersionHint")}
-\t\t\t\t\t\t
-\t\t\t\t\t>
-\t\t\t\t)}
-\t\t\t
-\t\t>
-\t)
+
+
+
+
+ {t("settings:providers.azureApiVersionHint")}
+
+ >
+ )}
+
+ >
+ )
}
diff --git a/webview-ui/src/components/ui/hooks/useSelectedModel.ts b/webview-ui/src/components/ui/hooks/useSelectedModel.ts
index c2a57942d2..15f03dafa9 100644
--- a/webview-ui/src/components/ui/hooks/useSelectedModel.ts
+++ b/webview-ui/src/components/ui/hooks/useSelectedModel.ts
@@ -3,6 +3,7 @@ import {
type ProviderSettings,
type ModelInfo,
anthropicModels,
+ azureModels,
bedrockModels,
cerebrasModels,
deepSeekModels,
@@ -369,9 +370,12 @@ function getSelectedModel({
// case "human-relay":
// case "fake-ai":
default: {
- provider satisfies "anthropic" | "gemini-cli" | "qwen-code" | "human-relay" | "fake-ai"
+ provider satisfies "anthropic" | "azure" | "gemini-cli" | "qwen-code" | "human-relay" | "fake-ai"
const id = apiConfiguration.apiModelId ?? defaultModelId
- const baseInfo = anthropicModels[id as keyof typeof anthropicModels]
+ const baseInfo =
+ provider === "azure"
+ ? azureModels[id as keyof typeof azureModels]
+ : anthropicModels[id as keyof typeof anthropicModels]
// Apply 1M context beta tier pricing for Claude Sonnet 4
if (
@@ -398,8 +402,12 @@ function getSelectedModel({
contextWindow: tier.contextWindow,
inputPrice: tier.inputPrice ?? baseInfo.inputPrice,
outputPrice: tier.outputPrice ?? baseInfo.outputPrice,
- cacheWritesPrice: tier.cacheWritesPrice ?? baseInfo.cacheWritesPrice,
- cacheReadsPrice: tier.cacheReadsPrice ?? baseInfo.cacheReadsPrice,
+ ...("cacheWritesPrice" in baseInfo && {
+ cacheWritesPrice: tier.cacheWritesPrice ?? baseInfo.cacheWritesPrice,
+ }),
+ ...("cacheReadsPrice" in baseInfo && {
+ cacheReadsPrice: tier.cacheReadsPrice ?? baseInfo.cacheReadsPrice,
+ }),
}
return { id, info }
}