Skip to content

Conversation

@AshishKumar4
Copy link
Contributor

@AshishKumar4 AshishKumar4 commented Dec 22, 2025

Summary

Refactors model configuration resolution into a centralized resolveModelConfig() function with field-by-field merging, and updates default model configurations for several agents.

Changes

  • config.ts: Updated model configurations:
    • blueprint: GEMINI_3_PRO_PREVIEWGEMINI_3_FLASH_PREVIEW, fallback: GEMINI_2_5_FLASHGEMINI_2_5_PRO
    • deepDebugger: GEMINI_3_PRO_PREVIEWGEMINI_3_FLASH_PREVIEW, temperature: 0.51
    • agenticProjectBuilder: GEMINI_2_5_PROGEMINI_3_FLASH_PREVIEW, temperature: 0.51
  • infer.ts: Major refactoring:
    • Added resolveModelConfig() function for field-by-field merge (userConfig > defaults)
    • Removed modelConfig parameter from InferenceParamsBase
    • Simplified executeInference() by removing ~80 lines of duplicate validation code
    • Fixed temperature handling: changed || to ?? to correctly preserve 0 values
    • Removed frequency_penalty retry logic for repetition errors
  • Operation classes: Removed modelConfigOverride from AgenticProjectBuilderInputs, DeepDebuggerInputs, and the abstract operation base class

Motivation

The previous model configuration resolution had duplicate validation blocks and complex nested conditionals. This refactoring:

  • Centralizes configuration resolution logic in one place
  • Makes the precedence rules explicit (userConfig > AGENT_CONFIG defaults)
  • Reduces code duplication and improves maintainability
  • Fixes edge cases with temperature = 0

Testing

  • Verify inference operations work correctly with the new model configurations
  • Test user model config overrides are properly applied
  • Ensure fallback model switching works during error retry scenarios

Breaking Changes

  • Removed modelConfigOverride parameter from AgenticProjectBuilderInputs and DeepDebuggerInputs
  • Any code relying on these override parameters will need to use userModelConfigs in the inference context instead

@github-actions
Copy link
Contributor

github-actions bot commented Dec 22, 2025

Claude finished @AshishKumar4's task in 1m 50s —— View job


Code Quality & Security Review

Recommendation: APPROVE (with minor suggestions)

PR Summary

Refactors model configuration resolution into a centralized resolveModelConfig() function and updates default model configurations for blueprint, deepDebugger, and agenticProjectBuilder agents.

PR Description

  • Updated: Yes - generated comprehensive description with summary, changes, motivation, testing notes, and breaking changes section.

Addressed Issues

  • None identified (no related open issues found)

Code Quality

Severity Count Details
Critical 0 -
High 0 -
Medium 1 Potential fallback to invalid model when all candidates fail validation
Low 1 Inconsistent nullish operator usage (?? vs `

Positive Changes:

  • Excellent refactoring - removes ~80 lines of duplicate validation logic
  • The old code had two identical constraint check blocks that were copy-pasted - now eliminated
  • Clear precedence: userConfig > AGENT_CONFIG defaults
  • Field-by-field merge allows granular customization while maintaining defaults
  • Fixed temperature handling with ?? to correctly preserve temperature: 0

Breaking Changes (documented):

  • modelConfigOverride parameter removed from AgenticProjectBuilderInputs and DeepDebuggerInputs
  • modelConfig parameter removed from InferenceParamsBase
  • External code using these overrides will need to migrate to userModelConfigs in the inference context

Removed Feature:

  • Frequency penalty retry logic for repetition errors was removed (lines 237-246 in old code). This was intentional simplification, but worth noting if this behavior was relied upon.

Security

Severity Count Details
Critical 0 -
High 0 -
Medium 0 -
Low 0 -

No security concerns identified. The changes are internal refactoring with no new external inputs or attack surface.

Testing

  • Manual testing recommended for:
    • User model config overrides being properly applied
    • Fallback model switching during error retry scenarios
    • Edge cases where user config specifies invalid models

Final Recommendation

Approve - This is a well-structured refactoring that improves code maintainability and removes duplication. The inline comments highlight minor improvements but are not blockers. The breaking changes are appropriately scoped to internal interfaces.


@AshishKumar4 AshishKumar4 merged commit e3a7652 into nightly Dec 22, 2025
3 of 5 checks passed
AshishKumar4 added a commit that referenced this pull request Dec 22, 2025
Feat: update model configurations and enhance inference handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant