mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-26 15:03:34 +08:00
fix: address PR review issues for Azure Codex integration
This commit is contained in:
parent
8afccf81c0
commit
fff08ee545
@ -105,7 +105,13 @@ export function resolveAzureOpenAIDeployment(model: string): string {
|
|||||||
|
|
||||||
const codex = resolveCodexDeployment(trimmed)
|
const codex = resolveCodexDeployment(trimmed)
|
||||||
if (codex) {
|
if (codex) {
|
||||||
if (codex === trimmed || codex.toLowerCase().includes('codex')) {
|
const codexLower = codex.toLowerCase()
|
||||||
|
if (
|
||||||
|
codex === trimmed ||
|
||||||
|
codexLower === 'gpt-5.2-codex' ||
|
||||||
|
codexLower === 'gpt-5.3-codex' ||
|
||||||
|
codexLower === 'gpt-5.4-codex'
|
||||||
|
) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Missing Azure OpenAI deployment mapping for ${trimmed}. Set AZURE_OPENAI_CODEX_DEPLOYMENT or settings.modelOverrides["${trimmed}"] to your deployment name.`,
|
`Missing Azure OpenAI deployment mapping for ${trimmed}. Set AZURE_OPENAI_CODEX_DEPLOYMENT or settings.modelOverrides["${trimmed}"] to your deployment name.`,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1028,7 +1028,7 @@ async function* queryModel(
|
|||||||
> {
|
> {
|
||||||
if (getAPIProvider() === 'azureOpenAI') {
|
if (getAPIProvider() === 'azureOpenAI') {
|
||||||
try {
|
try {
|
||||||
const systemText = systemPrompt.join('\\n')
|
const systemText = systemPrompt.join('\n')
|
||||||
const maxOutputTokens =
|
const maxOutputTokens =
|
||||||
options.maxOutputTokensOverride ??
|
options.maxOutputTokensOverride ??
|
||||||
getModelMaxOutputTokens(options.model).default
|
getModelMaxOutputTokens(options.model).default
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user