Skip to content

Conversation

@dileepyavan
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings December 18, 2025 22:04
@vs-code-engineering vs-code-engineering bot added this to the December / January 2026 milestone Dec 18, 2025
@dileepyavan dileepyavan reopened this Dec 18, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the OpenAI reasoning parameters configuration for gpt-5.2 and related models. The changes add support for a new 'concise' summary option and implement model-specific parameter defaults through a new helper function.

Key changes:

  • Adds 'concise' as a valid option for the ResponsesApiReasoningSummary configuration
  • Introduces reasoningParameterValuesBasedOnModel to override reasoning parameters for specific model families (hidden model B)
  • Adds a new model hash to the HIDDEN_MODEL_B_HASHES array to identify gpt-5.2+ models

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
src/platform/endpoint/node/responsesApi.ts Adds new function to set model-specific reasoning parameters; imports isHiddenModelB helper; changes default summary handling when config is 'off'
src/platform/endpoint/common/chatModelCapabilities.ts Adds new model hash to HIDDEN_MODEL_B_HASHES array for gpt-5.2 identification
src/platform/configuration/common/configurationService.ts Extends ResponsesApiReasoningSummary type to include 'concise' option

const effort = effortConfig === 'default' ? 'medium' : effortConfig;
const summary = summaryConfig === 'off' ? undefined : summaryConfig;
let effort = effortConfig === 'default' ? 'medium' : effortConfig;
let summary = summaryConfig === 'off' ? 'detailed' : summaryConfig;
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic change on line 61 modifies the behavior when summaryConfig === 'off'. Previously, this would result in summary = undefined, but now it defaults to 'detailed'. This changes the existing behavior: when users explicitly set the config to 'off', they likely expect reasoning summaries to be disabled, not to use 'detailed'.

Consider either:

  1. Keeping the original behavior where 'off' results in undefined
  2. Or if the behavior change is intentional, it should be documented in the PR description as a breaking change
Suggested change
let summary = summaryConfig === 'off' ? 'detailed' : summaryConfig;
let summary = summaryConfig === 'off' ? undefined : summaryConfig;

Copilot uses AI. Check for mistakes.
Comment on lines +82 to +88
function reasoningParameterValuesBasedOnModel(model: string, effort: ResponsesReasoningEffort, summary: ResponsesReasoningSummary): { effort?: ResponsesReasoningEffort; summary?: ResponsesReasoningSummary } | undefined {
if (isHiddenModelB(model)) {
return {
effort,
summary: 'concise',
};
}
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function reasoningParameterValuesBasedOnModel always overrides the summary parameter to 'concise' for hidden model B, regardless of the input summary value. However, it returns the effort parameter unchanged. This seems inconsistent - if the function is meant to override defaults for gpt-5.2+, why is only summary being overridden?

Additionally, the function accepts a summary parameter but ignores it when returning, making the parameter misleading. Consider either:

  1. Removing the summary parameter if it's not used
  2. Or using it in some conditional logic if there's a specific reason to accept it

Copilot uses AI. Check for mistakes.

// for gpt-5.2 + models, changing the default reasoning parameters
type ResponsesReasoningEffort = 'low' | 'medium' | 'high';
type ResponsesReasoningSummary = 'concise' | 'detailed';
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type definition for ResponsesReasoningSummary is missing the 'off' option that is present in the configuration type ConfigKey.ResponsesApiReasoningSummary. The config type is 'off' | 'concise' | 'detailed' but the local type only includes 'concise' | 'detailed'.

While 'off' is handled specially in the code (converting to 'detailed'), the type should accurately reflect all possible config values to maintain type safety and code clarity. Consider adding 'off' to the type definition or creating a separate type that represents the normalized values after processing the config.

Suggested change
type ResponsesReasoningSummary = 'concise' | 'detailed';
type ResponsesReasoningSummary = 'off' | 'concise' | 'detailed';

Copilot uses AI. Check for mistakes.
return body;
}

// for gpt-5.2 + models, changing the default reasoning parameters
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment "for gpt-5.2 + models" is vague and could be clearer. The function applies to "hidden model B" which may include various models, not just gpt-5.2. Consider updating the comment to be more accurate, such as "Adjusts reasoning parameters for specific model families (hidden model B)" or refer to the actual logic that determines which models are affected.

Suggested change
// for gpt-5.2 + models, changing the default reasoning parameters
// Adjust reasoning parameter defaults for specific model families (hidden model B)

Copilot uses AI. Check for mistakes.
}
}


Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two consecutive blank lines (lines 90-91) which is inconsistent with the rest of the codebase style. According to the coding standards, there should typically be only one blank line between functions.

Suggested change

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants