Skip to content

feat(models): add GPT-5.2 and comprehensive model updates across all providers - #669

Merged
murdore merged 1 commit into
releasefrom
feat/latest-model-update
Dec 12, 2025
Merged

murdore merged 1 commit into
releasefrom
feat/latest-model-update

Conversation

@murdore

@murdore murdore commented Dec 12, 2025 •

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for OpenAI's latest GPT-5.2 model series (released December 11, 2025) along with comprehensive updates to model registry entries.

GPT-5.2 Series Added

Model Description Key Features
gpt-5.2 Deep reasoning model 100% on AIME 2025, 256K context
gpt-5.2-chat-latest Fast everyday model Instant responses, same capabilities
gpt-5.2-pro Highest quality tier 92.4% GPQA Diamond, 128K max output

Changes

  • Enums: Added GPT_5_2, GPT_5_2_CHAT_LATEST, GPT_5_2_PRO to OpenAIModels
  • Model Registry: Full registry entries with pricing, capabilities, context limits
  • Vision Capabilities: All GPT-5.2 variants added to vision-capable models list
  • Recommendations: Updated USE_CASE_RECOMMENDATIONS to include GPT-5.2 at top for coding, creative, analysis, conversation, reasoning, high-quality, fast, and multimodal use cases

Pricing (per 1K tokens)

Model Input Output Cached Input
GPT-5.2 / Chat Latest $0.00175 $0.014 $0.0004375
GPT-5.2 Pro $0.021 $0.168 $0.00525

Technical Details

  • No breaking changes - additive only
  • All tests passing (101 tests)
  • Build successful
  • Pre-commit hooks passed

Test Plan

  • TypeScript type checking passes
  • All 101 unit tests pass
  • Build completes successfully
  • Pre-commit hooks (lint, format, security) pass
  • Manual verification of GPT-5.2 model selection in CLI

Summary by CodeRabbit

  • New Features

    • Expanded model catalog and provider coverage (including GPT-5 family, latest Gemini, Claude variants, Mistral, Bedrock and many vision-capable/multimodal models), improving available options and vision support.
  • Documentation

    • Reworked feature and API reference tables for clearer headers, alignment, and consistent wording.
  • Refactor

    • Standardized model/default identifiers to centralized constants and harmonized provider mappings for more consistent behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings December 12, 2025 07:27
@coderabbitai

coderabbitai Bot commented Dec 12, 2025 •

Copy link
Copy Markdown

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

This PR enlarges the model and vision-capability catalogs (many new provider/model entries), replaces several hard-coded default model strings with enum constants, and applies markdown/table formatting updates to feature docs; no API signatures or runtime control flow changes were introduced.

Changes

Cohort / File(s) Summary
Documentation formatting
docs/features/index.md, docs/features/office-documents.md, docs/sdk/api-reference.md
Table/header reformatting, alignment and whitespace edits, and minor prose adjustments; no functional changes.
Vision capability expansion
src/lib/adapters/providerImageAdapter.ts
Expanded VISION_CAPABILITIES with many additional vision-capable models/variants and added provider mappings for new providers (e.g., huggingface, sagemaker, bedrock, mistral, litellm).
Model enum centralization & growth
src/lib/constants/enums.ts
Large additive expansion of public enums across providers (OpenAI GPT‑5 family, Claude variants, Bedrock Nova/Titan/Llama/Mistral families, Vertex/Gemini, Mistral, Ollama, HuggingFace, SageMaker, LiteLLM, etc.).
Provider registry enum adoption
src/lib/factories/providerRegistry.ts
Replaced hard-coded default model ID strings with enum constants and added corresponding enum imports.
Model registry expansion
src/lib/models/modelRegistry.ts
Massive addition of MODEL_REGISTRY entries: new models, aliases, capabilities (vision, functionCalling, streaming, etc.), pricing, limits, and use-case mappings.
Tests / small tweaks
test/unit/cli/video-flags.test.ts
Comment and spacing adjustments for flag arrays and yargs mapping only; no logic changes.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

  • Large, heterogeneous additions across enums, model registry, and provider mappings demand careful consistency checks.
  • Pay special attention to:
    • Enum naming/duplication and correct exports in src/lib/constants/enums.ts.
    • Cross-references from providerRegistry.ts, modelRegistry.ts, and providerImageAdapter.ts to ensure enum members are valid and consistently referenced.
    • Pricing, token limits, and capability flags in modelRegistry.ts for realistic/consistent values.
    • Provider routing/adapter logic in providerImageAdapter.ts for new providers to avoid validation mismatches.

Possibly related PRs

Suggested labels

released

Poem

🐇 Hop-hop, I catalog and cheer,

New models bloom far and near.
Enums tidy strings once wild,
Vision models stacked, compiled.
A rabbit's grin — our registry's styled! 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main objective of the pull request: adding GPT-5.2 models and updating the model registry across providers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/latest-model-update

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Dec 12, 2025 •

Copy link
Copy Markdown
Contributor

✅ Single Commit Policy - COMPLIANT

Status: Policy requirements met • 1 commit • Valid format • Ready for merge

📊 View validation details

📝 Commit Details

  • Hash: 443b90a2674d401f89c64264592ee56738689456
  • Message: feat(models): add GPT-5.2 and comprehensive model updates across all providers
  • Author: Sachin Sharma

✅ Validation Results

  • Single commit requirement met
  • No merge commits in branch
  • Semantic commit message format verified
  • Ready for squash merge to release branch

🤖 Automated validation by NeuroLink Single Commit Enforcement

@github-actions

Copy link
Copy Markdown
Contributor

🤖 AI Review & Build Compliance ✅

Status: AI analysis complete • Build rules validated • Ready for review

📊 View detailed analysis results

🛡️ Analysis Complete

  • ✅ Security scan (vulnerabilities, API keys)
  • ✅ TypeScript safety & code quality
  • ✅ Error handling & best practices
  • ✅ Build rule enforcement validated
  • ✅ Commit format & compliance checks

📋 Ready for Merge When

  • All CI checks passing
  • Manual review approved
  • Any AI-flagged issues resolved

🤖 AI analysis complete - check individual code comments for specific feedback

Copilot AI left a comment

Copy link
Copy Markdown

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 adds support for OpenAI's purported GPT-5.2 model series and comprehensive model registry updates across all providers. However, there are critical issues with this PR: the GPT-5.2 models (and many other models) referenced do not exist in OpenAI's or other providers' current model lineups as of January 2025, and many release dates are set in the future.

Key Changes:

  • Adds GPT-5.2, GPT-5.2-chat-latest, and GPT-5.2-pro model enums and registry entries
  • Expands model registries for all providers (OpenAI, Azure, Anthropic, Google, Mistral, Ollama, Bedrock, HuggingFace, LiteLLM)
  • Updates vision capabilities list to include new models
  • Updates USE_CASE_RECOMMENDATIONS to prioritize new models
  • Minor documentation formatting improvements

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/lib/constants/enums.ts Adds GPT-5.2 series enums and comprehensive provider enum expansions. Contains non-existent model references.
src/lib/models/modelRegistry.ts Adds full registry entries for GPT-5.2 and many other future/non-existent models with pricing, capabilities, and metadata. Contains future release dates.
src/lib/factories/providerRegistry.ts Updates default models to use enum constants instead of string literals (good practice improvement).
src/lib/adapters/providerImageAdapter.ts Adds GPT-5.2 models to vision capabilities list and expands coverage for all providers. Includes non-existent models. Fixes Claude Opus 4.5 date.
docs/sdk/api-reference.md Formatting improvements for tables (whitespace/alignment only).
docs/features/office-documents.md Formatting improvements for tables (whitespace/alignment only).
docs/features/index.md Formatting improvements for tables (whitespace/alignment only).
test/unit/cli/video-flags.test.ts Whitespace formatting improvements (trailing space removal, alignment).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +29 to +31
"gpt-5.2",
"gpt-5.2-chat-latest",
"gpt-5.2-pro",

Copilot AI Dec 12, 2025

Copy link

Choose a reason for hiding this comment

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

Adding non-existent GPT-5.2 models to the VISION_CAPABILITIES list will cause issues when users try to use these models for vision tasks. The application will allow these model names but they will fail when called against OpenAI's API since these models don't exist.

Suggested change
"gpt-5.2",
"gpt-5.2-chat-latest",
"gpt-5.2-pro",

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a FALSE POSITIVE. The GPT-5.2 models are real OpenAI models that were officially released on December 11, 2025.

Evidence

  1. Official OpenAI Announcement: OpenAI launched GPT-5.2 on December 11, 2025, as their "most capable model series yet" - see the official announcement at https://openai.com/index/introducing-gpt-5-2/

  2. Vision Capabilities Confirmed: According to OpenAI's official documentation, GPT-5.2 Thinking is OpenAI's strongest vision model yet, cutting error rates roughly in half on chart reasoning and software interface understanding compared to previous models.

  3. Three Model Variants: The GPT-5.2 series includes:

    • gpt-5.2 (Thinking) - Complex structured work including vision tasks
    • gpt-5.2-chat-latest (Instant) - Speed-optimized for routine queries
    • gpt-5.2-pro (Pro) - Maximum accuracy for difficult problems
  4. Technical Specifications:

    • 400,000 token context window
    • 128,000 max output tokens
    • Knowledge cutoff: August 31, 2025
    • Pricing: $1.75/million input, $14/million output tokens

Why This Matters

The GPT-5.2 models added to VISION_CAPABILITIES are correctly configured. These models support multimodal input including images, PDFs, and text, with significantly improved vision understanding compared to GPT-5.1.

Sources:

Comment on lines 33 to 35
CLAUDE_4_5_OPUS = "anthropic.claude-opus-4-5-20251124-v1:0",
CLAUDE_4_5_SONNET = "anthropic.claude-sonnet-4-5-20250929-v1:0",
CLAUDE_4_5_HAIKU = "anthropic.claude-haiku-4-5-20251001-v1:0",

Copilot AI Dec 12, 2025

Copy link

Choose a reason for hiding this comment

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

The order of CLAUDE_4_5_OPUS and CLAUDE_4_5_SONNET in the Bedrock enum differs from the Anthropic enum and Vertex enum. For consistency, CLAUDE_4_5_OPUS should be listed before CLAUDE_4_5_SONNET across all provider enums, matching the version hierarchy (Opus > Sonnet > Haiku).

Copilot uses AI. Check for mistakes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
src/lib/constants/enums.ts (1)

372-418: Consider organizing MistralModels enum by capability rather than size.

The MistralModels enum groups models by size/tier (Large, Medium, Small), but models like Pixtral (vision), Voxtral (audio), Codestral (code), and Devstral (development) have distinct capabilities. Consider reorganizing with clearer capability-based sections to improve maintainability.

Apply this diff for better organization:

 export enum MistralModels {
-  // Mistral Large (Latest)
+  // ============================================================================
+  // TEXT GENERATION MODELS
+  // ============================================================================
+
+  // Large Models
   MISTRAL_LARGE_LATEST = "mistral-large-latest",
   MISTRAL_LARGE_2512 = "mistral-large-2512",
 
-  // Mistral Medium
+  // Medium Models
   MISTRAL_MEDIUM_LATEST = "mistral-medium-latest",
   MISTRAL_MEDIUM_2508 = "mistral-medium-2508",
 
-  // Mistral Small
+  // Small Models
   MISTRAL_SMALL_LATEST = "mistral-small-latest",
   MISTRAL_SMALL_2506 = "mistral-small-2506",
 
-  // Magistral (Reasoning)
+  // Edge Models
+  MINISTRAL_14B_2512 = "ministral-14b-2512",
+  MINISTRAL_8B_2512 = "ministral-8b-2512",
+  MINISTRAL_3B_2512 = "ministral-3b-2512",
+
+  // ============================================================================
+  // SPECIALIZED MODELS
+  // ============================================================================
+
+  // Reasoning Models
   MAGISTRAL_MEDIUM_LATEST = "magistral-medium-latest",
   MAGISTRAL_SMALL_LATEST = "magistral-small-latest",
 
-  // Ministral (Edge Models)
-  MINISTRAL_14B_2512 = "ministral-14b-2512",
-  MINISTRAL_8B_2512 = "ministral-8b-2512",
-  MINISTRAL_3B_2512 = "ministral-3b-2512",
-
-  // Codestral (Code Generation)
+  // Code Generation Models
   CODESTRAL_LATEST = "codestral-latest",
   CODESTRAL_2508 = "codestral-2508",
   CODESTRAL_EMBED = "codestral-embed",
 
-  // Devstral (Software Development)
+  // Software Development Models
   DEVSTRAL_MEDIUM_LATEST = "devstral-medium-latest",
   DEVSTRAL_SMALL_LATEST = "devstral-small-latest",
 
-  // Pixtral (Multimodal/Vision)
+  // Multimodal Models (Vision)
   PIXTRAL_LARGE = "pixtral-large",
   PIXTRAL_12B = "pixtral-12b",
 
-  // Voxtral (Audio)
+  // Multimodal Models (Audio)
   VOXTRAL_SMALL_LATEST = "voxtral-small-latest",
   VOXTRAL_MINI_LATEST = "voxtral-mini-latest",
 
-  // Specialized Models
+  // ============================================================================
+  // OTHER MODELS
+  // ============================================================================
+
   MISTRAL_NEMO = "mistral-nemo",
   MISTRAL_EMBED = "mistral-embed",
   MISTRAL_MODERATION_LATEST = "mistral-moderation-latest",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e76ab73 and 8a2ccda.

📒 Files selected for processing (8)
  • docs/features/index.md (1 hunks)
  • docs/features/office-documents.md (21 hunks)
  • docs/sdk/api-reference.md (3 hunks)
  • src/lib/adapters/providerImageAdapter.ts (10 hunks)
  • src/lib/constants/enums.ts (4 hunks)
  • src/lib/factories/providerRegistry.ts (7 hunks)
  • src/lib/models/modelRegistry.ts (8 hunks)
  • test/unit/cli/video-flags.test.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/adapters/providerImageAdapter.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Update ProviderImageAdapter.VISION_CAPABILITIES and ProviderImageAdapter.adaptImageForProvider() when adding vision support for new models

Files:

  • src/lib/adapters/providerImageAdapter.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Maintain strict TypeScript type safety across all modules with comprehensive type definitions organized by domain to avoid circular dependencies
Use ErrorFactory for creating typed errors throughout the application
Wrap async operations with withTimeout utility for timeout handling

Files:

  • src/lib/adapters/providerImageAdapter.ts
  • src/lib/factories/providerRegistry.ts
  • test/unit/cli/video-flags.test.ts
  • src/lib/models/modelRegistry.ts
  • src/lib/constants/enums.ts
**/factories/providerRegistry.ts

📄 CodeRabbit inference engine (CLAUDE.md)

All providers must be loaded via dynamic imports to break circular dependency chains in the ProviderRegistry

Files:

  • src/lib/factories/providerRegistry.ts
🧠 Learnings (13)
📓 Common learnings
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: Applies to **/adapters/providerImageAdapter.ts : Update ProviderImageAdapter.VISION_CAPABILITIES and ProviderImageAdapter.adaptImageForProvider() when adding vision support for new models
Learnt from: YasmeenOgo
Repo: juspay/neurolink PR: 145
File: src/lib/core/types.ts:0-0
Timestamp: 2025-09-02T13:50:42.770Z
Learning: The APIVersions enum in src/lib/core/types.ts now contains comprehensive API version constants for all major AI providers: Azure OpenAI (latest, stable, legacy), OpenAI (current, beta), Google AI (current, beta), and Anthropic (current). This centralization helps avoid API version drift across the codebase.
Learnt from: RajuSudhar
Repo: juspay/neurolink PR: 173
File: src/lib/types/index.ts:58-62
Timestamp: 2025-09-17T18:14:34.960Z
Learning: RajuSudhar explained that in the Neurolink codebase, there are multiple ProviderConfig types causing inconsistency. One existing ProviderConfig type better suited the "ProviderConfig" name, so they renamed the less-suitable one to AIModelProviderConfig to free up the name. Adding backward compatibility aliases would worsen naming inconsistency rather than help. The remaining duplicates will be systematically deduplicated in the 07-Types-Module.md TODO as part of their phased refactor approach.
Learnt from: RajuSudhar
Repo: juspay/neurolink PR: 173
File: src/lib/index.ts:16-16
Timestamp: 2025-09-17T17:55:15.261Z
Learning: In src/lib/types/providers.ts, ProviderConfig was renamed to AIModelProviderConfig to deduplicate type names, as there was an existing ProviderConfig type that better suited the "ProviderConfig" name. This was an intentional breaking change for better type organization.
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: All providers must support the same core interface for consistency across the 12+ AI provider implementations
Learnt from: vigneshJuspay
Repo: juspay/neurolink PR: 237
File: memory-bank/tts-provider-implementation-plan.md:92-106
Timestamp: 2025-11-17T13:53:20.209Z
Learning: In PR 237's TTS modality implementation approach, TTS functionality uses GOOGLE_AI_API_KEY (not GOOGLE_TTS_API_KEY) when using the google-ai provider. TTS is implemented as an output modality that leverages the existing google-ai provider authentication.
📚 Learning: 2025-09-01T22:58:39.149Z
Learnt from: sudharsan-juspay
Repo: juspay/neurolink PR: 140
File: src/lib/core/types.ts:198-203
Timestamp: 2025-09-01T22:58:39.149Z
Learning: In src/lib/core/types.ts, StreamOptions (imported from streamTypes.js) and StreamingOptions are intentionally different types with different use cases. StreamingOptions is for unified AI requests with multiple provider configurations, while StreamOptions is for individual streaming operations.

Applied to files:

  • docs/features/office-documents.md
📚 Learning: 2025-12-10T12:24:51.147Z
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: Applies to **/types/index.ts : Add new provider names to the AIProviderName enum in src/lib/types/index.ts when adding a new provider

Applied to files:

  • docs/features/office-documents.md
  • src/lib/factories/providerRegistry.ts
  • src/lib/models/modelRegistry.ts
  • src/lib/constants/enums.ts
📚 Learning: 2025-12-10T12:24:51.147Z
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: Applies to **/utils/pdfProcessor.ts : PDF processing must be handled through PDFProcessor in src/lib/utils/pdfProcessor.ts with provider-specific handling in the message builder

Applied to files:

  • docs/features/office-documents.md
  • docs/sdk/api-reference.md
📚 Learning: 2025-12-10T12:24:51.147Z
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: Applies to **/utils/fileDetector.ts : File type detection must use FileDetector in src/lib/utils/fileDetector.ts for automatic detection of file types

Applied to files:

  • docs/features/office-documents.md
📚 Learning: 2025-12-10T12:24:51.147Z
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: Applies to **/adapters/providerImageAdapter.ts : Update ProviderImageAdapter.VISION_CAPABILITIES and ProviderImageAdapter.adaptImageForProvider() when adding vision support for new models

Applied to files:

  • src/lib/adapters/providerImageAdapter.ts
  • src/lib/factories/providerRegistry.ts
  • src/lib/models/modelRegistry.ts
  • src/lib/constants/enums.ts
📚 Learning: 2025-09-17T17:55:15.261Z
Learnt from: RajuSudhar
Repo: juspay/neurolink PR: 173
File: src/lib/index.ts:16-16
Timestamp: 2025-09-17T17:55:15.261Z
Learning: In src/lib/types/providers.ts, ProviderConfig was renamed to AIModelProviderConfig to deduplicate type names, as there was an existing ProviderConfig type that better suited the "ProviderConfig" name. This was an intentional breaking change for better type organization.

Applied to files:

  • src/lib/adapters/providerImageAdapter.ts
  • src/lib/factories/providerRegistry.ts
  • src/lib/models/modelRegistry.ts
  • src/lib/constants/enums.ts
📚 Learning: 2025-09-02T13:50:42.770Z
Learnt from: YasmeenOgo
Repo: juspay/neurolink PR: 145
File: src/lib/core/types.ts:0-0
Timestamp: 2025-09-02T13:50:42.770Z
Learning: The APIVersions enum in src/lib/core/types.ts now contains comprehensive API version constants for all major AI providers: Azure OpenAI (latest, stable, legacy), OpenAI (current, beta), Google AI (current, beta), and Anthropic (current). This centralization helps avoid API version drift across the codebase.

Applied to files:

  • src/lib/adapters/providerImageAdapter.ts
  • src/lib/factories/providerRegistry.ts
  • src/lib/models/modelRegistry.ts
  • src/lib/constants/enums.ts
📚 Learning: 2025-09-17T18:14:34.960Z
Learnt from: RajuSudhar
Repo: juspay/neurolink PR: 173
File: src/lib/types/index.ts:58-62
Timestamp: 2025-09-17T18:14:34.960Z
Learning: RajuSudhar explained that in the Neurolink codebase, there are multiple ProviderConfig types causing inconsistency. One existing ProviderConfig type better suited the "ProviderConfig" name, so they renamed the less-suitable one to AIModelProviderConfig to free up the name. Adding backward compatibility aliases would worsen naming inconsistency rather than help. The remaining duplicates will be systematically deduplicated in the 07-Types-Module.md TODO as part of their phased refactor approach.

Applied to files:

  • src/lib/adapters/providerImageAdapter.ts
  • src/lib/factories/providerRegistry.ts
  • src/lib/models/modelRegistry.ts
  • src/lib/constants/enums.ts
📚 Learning: 2025-12-10T12:24:51.147Z
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: Applies to **/providers/*.ts : Providers must extend a base provider or implement the provider interface and register in ProviderRegistry.registerAllProviders() with provider name, factory function, default model, and aliases

Applied to files:

  • src/lib/factories/providerRegistry.ts
📚 Learning: 2025-12-10T12:24:51.147Z
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: Applies to **/factories/providerRegistry.ts : All providers must be loaded via dynamic imports to break circular dependency chains in the ProviderRegistry

Applied to files:

  • src/lib/factories/providerRegistry.ts
📚 Learning: 2025-12-10T12:24:51.147Z
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: Applies to **/cli/factories/commandFactory.ts : Register CLI provider choices in src/cli/factories/commandFactory.ts when adding new providers

Applied to files:

  • src/lib/factories/providerRegistry.ts
📚 Learning: 2025-12-10T12:24:51.147Z
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: All providers must support the same core interface for consistency across the 12+ AI provider implementations

Applied to files:

  • src/lib/factories/providerRegistry.ts
  • docs/features/index.md
🧬 Code graph analysis (2)
src/lib/models/modelRegistry.ts (1)
src/lib/index.ts (2)
  • OpenAIModels (40-40)
  • BedrockModels (39-39)
src/lib/constants/enums.ts (1)
src/lib/index.ts (1)
  • OpenAIModels (40-40)
🔇 Additional comments (20)
test/unit/cli/video-flags.test.ts (1)

1-137: LGTM - Formatting changes only.

The changes are purely cosmetic adjustments to inline comments and spacing. No functional test logic was modified.

docs/features/index.md (1)

28-51: LGTM - Markdown table formatting improvements.

The changes improve table alignment and readability without altering any content or links.

docs/features/office-documents.md (1)

19-31: LGTM - Documentation formatting improvements.

All changes in this file are presentational adjustments: table alignment, whitespace normalization, and code block formatting. Content semantics are preserved.

docs/sdk/api-reference.md (2)

596-599: LGTM - Whitespace formatting adjustments.

Minor spacing normalization in the GenerateOptions interface documentation.


1981-1988: LGTM - Table formatting improvements.

Office Document Provider Support table reformatted for better alignment.

src/lib/factories/providerRegistry.ts (4)

14-20: Good refactor: Centralizing model identifiers via enums.

The import additions for provider-specific model enums align with the PR's goal of replacing hard-coded strings with centralized constants. This improves maintainability and type safety.


174-176: Environment variable takes precedence - good pattern.

The HUGGINGFACE_MODEL environment variable correctly takes precedence over the enum default, maintaining backward compatibility and user configurability.


92-93: AnthropicModels.CLAUDE_SONNET_4_0 is correctly defined. The enum value exists in src/lib/constants/enums.ts (line 357) and properly maps to "claude-sonnet-4-20250514", a valid Anthropic model identifier. The dynamic import pattern for AnthropicProvider is also properly implemented.


161-162: Vertex provider correctly defaults to Claude; consider using the latest CLAUDE_4_5_SONNET instead.

The VertexModels enum supports Claude models exclusively on Vertex AI (no Gemini variants), confirming that CLAUDE_4_0_SONNET is an intentional choice. However, CLAUDE_4_5_SONNET is available as the latest model (December 2025) and may be a more appropriate default unless CLAUDE_4_0_SONNET is locked for compatibility reasons.

src/lib/models/modelRegistry.ts (5)

11-17: Good: Enum imports for type-safe model identifiers.

Adding imports for AzureOpenAIModels, BedrockModels, MistralModels, and OllamaModels enables consistent model identification across the registry.


347-392: GPT-5.2 entries align with PR objectives.

The GPT-5.2 model entry correctly reflects the pricing ($0.00175/$0.014 per 1K tokens) and capabilities (vision, 256K context) specified in the PR description.


440-484: GPT-5.2 Pro pricing and capabilities verified.

The GPT-5.2 Pro entry correctly uses the pricing from PR objectives ($0.021 input, $0.168 output per 1K tokens) and 128K max output tokens.


2296-2296: LGTM: Local alias updated to use enum constant.

Consistent with the pattern of using enum values instead of string literals.


2301-2378: USE_CASE_RECOMMENDATIONS updated with latest models.

The recommendations now properly reference GPT-5.2 variants for coding, creative, analysis, reasoning, and other use cases. The structure is consistent and aligns with the PR's goal of making GPT-5.2 the top recommendation.

src/lib/constants/enums.ts (5)

28-169: Excellent organization of BedrockModels enum.

The BedrockModels enum is well-structured with clear section separators and comprehensive comments. The organization by provider (Anthropic Claude, Amazon Nova, Titan, Meta Llama, Mistral, Others) makes it easy to navigate and maintain.


420-518: Well-documented OllamaModels enum with helpful categorization.

The OllamaModels enum provides excellent documentation with comments describing capabilities (e.g., "Multimodal with vision and tool capabilities", "High-performance models", "Vision-Language"). This helps developers choose the right model for their use case.


520-579: Good use of provider prefixes in LiteLLMModels enum.

The LiteLLMModels enum correctly uses provider-specific prefixes (e.g., "openai/", "anthropic/", "vertex_ai/") which aligns with LiteLLM's proxy interface pattern. This makes it clear which underlying provider each model uses.


216-259: Azure GPT-5.1 models are legitimate and fully supported.

Azure OpenAI supports the GPT-5.1 family including all variants listed in the enum: gpt-5.1, gpt-5.1-chat, gpt-5.1-codex, gpt-5.1-codex-mini, and gpt-5.1-codex-max. These are available through Azure/Microsoft Foundry as of December 2025 with regional availability (e.g., East US2, Sweden Central) subject to registration requirements. GPT-5.2 has launched, but GPT-5.1 remains available for API and partner access.


175-209: Verify model identifier variants against OpenAI's official API documentation.

The GPT-5.2, GPT-5, and GPT-4.1 families are confirmed as real models. However, confirm that all variant suffixes (e.g., -pro, -mini, -nano) for these model families are officially supported API identifiers in OpenAI's documentation, as some may be marketing terms rather than valid API model IDs. Additionally, note that only o4-mini is documented; no top-level o4 model exists.

src/lib/adapters/providerImageAdapter.ts (1)

26-355: All newly added models in VISION_CAPABILITIES are correctly listed with verified vision/multimodal support.

Verification confirms that OpenAI's GPT-5.2, o3-pro, o4-mini-deep-research, Google's Gemini 2.5 Flash Lite and Gemini 2.0 Flash preview-image-generation, AWS Nova models, and other listed models all support vision inputs as documented. The validateVisionSupport() method properly validates these capabilities at runtime. No corrections needed to the VISION_CAPABILITIES list.

Comment thread src/lib/adapters/providerImageAdapter.ts
Comment thread src/lib/models/modelRegistry.ts
@github-actions

Copy link
Copy Markdown
Contributor

🤖 AI Review & Build Compliance ✅

Status: AI analysis complete • Build rules validated • Ready for review

📊 View detailed analysis results

🛡️ Analysis Complete

  • ✅ Security scan (vulnerabilities, API keys)
  • ✅ TypeScript safety & code quality
  • ✅ Error handling & best practices
  • ✅ Build rule enforcement validated
  • ✅ Commit format & compliance checks

📋 Ready for Merge When

  • All CI checks passing
  • Manual review approved
  • Any AI-flagged issues resolved

🤖 AI analysis complete - check individual code comments for specific feedback

…providers

Add OpenAI GPT-5.2 series (released Dec 11, 2025):
- GPT-5.2 (Thinking) - deep reasoning with 100% AIME 2025
- GPT-5.2 Chat Latest (Instant) - fast everyday model
- GPT-5.2 Pro - highest quality for science/math (92.4% GPQA Diamond)

Updates include:
- New enum values in constants/enums.ts
- Full model registry entries with pricing, capabilities, and limits
- Vision capabilities for all GPT-5.2 variants
- Updated USE_CASE_RECOMMENDATIONS with GPT-5.2 at top
@murdore
murdore force-pushed the feat/latest-model-update branch from 111898a to 443b90a Compare December 12, 2025 10:54
@murdore

murdore commented Dec 12, 2025

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Dec 12, 2025

Copy link
Copy Markdown
✅ Actions performed

Full review triggered.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (3)
src/lib/constants/enums.ts (1)

346-370: Minor naming inconsistency in AnthropicModels.

The naming pattern is inconsistent within the Claude 4.5 series:

  • CLAUDE_OPUS_4_5 and CLAUDE_SONNET_4_5 follow CLAUDE_{TIER}_{VERSION} pattern
  • CLAUDE_4_5_HAIKU follows CLAUDE_{VERSION}_{TIER} pattern

Consider aligning to a single pattern for consistency:

  // Claude 4.5 Series (Latest - September-November 2025)
  CLAUDE_OPUS_4_5 = "claude-opus-4-5-20251101",
  CLAUDE_SONNET_4_5 = "claude-sonnet-4-5-20250929",
- CLAUDE_4_5_HAIKU = "claude-haiku-4-5-20251001",
+ CLAUDE_HAIKU_4_5 = "claude-haiku-4-5-20251001",
src/lib/factories/providerRegistry.ts (1)

134-140: Consider using enum for Azure fallback.

Azure provider still falls back to the hard-coded string "gpt-4o-mini" while other providers use enum constants. For consistency, consider using OpenAIModels.GPT_4O_MINI as the fallback.

         process.env.AZURE_MODEL ||
           process.env.AZURE_OPENAI_MODEL ||
           process.env.AZURE_OPENAI_DEPLOYMENT ||
           process.env.AZURE_OPENAI_DEPLOYMENT_ID ||
-          "gpt-4o-mini",
+          OpenAIModels.GPT_4O_MINI,
src/lib/models/modelRegistry.ts (1)

363-367: Consider adding cached input pricing.

The PR description mentions cached input pricing ($0.0004375 for GPT-5.2, $0.00525 for GPT-5.2 Pro), but the registry only captures standard input/output costs. If the ModelInfo type supports it, consider adding cachedInputCostPer1K for completeness.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e76ab73 and 443b90a.

📒 Files selected for processing (8)
  • docs/features/index.md (1 hunks)
  • docs/features/office-documents.md (21 hunks)
  • docs/sdk/api-reference.md (3 hunks)
  • src/lib/adapters/providerImageAdapter.ts (11 hunks)
  • src/lib/constants/enums.ts (3 hunks)
  • src/lib/factories/providerRegistry.ts (7 hunks)
  • src/lib/models/modelRegistry.ts (8 hunks)
  • test/unit/cli/video-flags.test.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Maintain strict TypeScript type safety across all modules with comprehensive type definitions organized by domain to avoid circular dependencies
Use ErrorFactory for creating typed errors throughout the application
Wrap async operations with withTimeout utility for timeout handling

Files:

  • src/lib/models/modelRegistry.ts
  • src/lib/factories/providerRegistry.ts
  • src/lib/adapters/providerImageAdapter.ts
  • test/unit/cli/video-flags.test.ts
  • src/lib/constants/enums.ts
**/factories/providerRegistry.ts

📄 CodeRabbit inference engine (CLAUDE.md)

All providers must be loaded via dynamic imports to break circular dependency chains in the ProviderRegistry

Files:

  • src/lib/factories/providerRegistry.ts
**/adapters/providerImageAdapter.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Update ProviderImageAdapter.VISION_CAPABILITIES and ProviderImageAdapter.adaptImageForProvider() when adding vision support for new models

Files:

  • src/lib/adapters/providerImageAdapter.ts
🧠 Learnings (13)
📓 Common learnings
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: Applies to **/adapters/providerImageAdapter.ts : Update ProviderImageAdapter.VISION_CAPABILITIES and ProviderImageAdapter.adaptImageForProvider() when adding vision support for new models
Learnt from: RajuSudhar
Repo: juspay/neurolink PR: 173
File: src/lib/types/index.ts:58-62
Timestamp: 2025-09-17T18:14:34.960Z
Learning: RajuSudhar explained that in the Neurolink codebase, there are multiple ProviderConfig types causing inconsistency. One existing ProviderConfig type better suited the "ProviderConfig" name, so they renamed the less-suitable one to AIModelProviderConfig to free up the name. Adding backward compatibility aliases would worsen naming inconsistency rather than help. The remaining duplicates will be systematically deduplicated in the 07-Types-Module.md TODO as part of their phased refactor approach.
Learnt from: RajuSudhar
Repo: juspay/neurolink PR: 173
File: src/lib/index.ts:16-16
Timestamp: 2025-09-17T17:55:15.261Z
Learning: In src/lib/types/providers.ts, ProviderConfig was renamed to AIModelProviderConfig to deduplicate type names, as there was an existing ProviderConfig type that better suited the "ProviderConfig" name. This was an intentional breaking change for better type organization.
📚 Learning: 2025-09-01T22:58:39.149Z
Learnt from: sudharsan-juspay
Repo: juspay/neurolink PR: 140
File: src/lib/core/types.ts:198-203
Timestamp: 2025-09-01T22:58:39.149Z
Learning: In src/lib/core/types.ts, StreamOptions (imported from streamTypes.js) and StreamingOptions are intentionally different types with different use cases. StreamingOptions is for unified AI requests with multiple provider configurations, while StreamOptions is for individual streaming operations.

Applied to files:

  • docs/features/office-documents.md
📚 Learning: 2025-12-10T12:24:51.147Z
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: Applies to **/types/index.ts : Add new provider names to the AIProviderName enum in src/lib/types/index.ts when adding a new provider

Applied to files:

  • docs/features/office-documents.md
  • src/lib/models/modelRegistry.ts
  • src/lib/factories/providerRegistry.ts
  • src/lib/adapters/providerImageAdapter.ts
  • src/lib/constants/enums.ts
📚 Learning: 2025-12-10T12:24:51.147Z
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: Applies to **/utils/pdfProcessor.ts : PDF processing must be handled through PDFProcessor in src/lib/utils/pdfProcessor.ts with provider-specific handling in the message builder

Applied to files:

  • docs/features/office-documents.md
  • docs/sdk/api-reference.md
📚 Learning: 2025-12-10T12:24:51.147Z
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: Applies to **/utils/fileDetector.ts : File type detection must use FileDetector in src/lib/utils/fileDetector.ts for automatic detection of file types

Applied to files:

  • docs/features/office-documents.md
📚 Learning: 2025-09-17T17:55:15.261Z
Learnt from: RajuSudhar
Repo: juspay/neurolink PR: 173
File: src/lib/index.ts:16-16
Timestamp: 2025-09-17T17:55:15.261Z
Learning: In src/lib/types/providers.ts, ProviderConfig was renamed to AIModelProviderConfig to deduplicate type names, as there was an existing ProviderConfig type that better suited the "ProviderConfig" name. This was an intentional breaking change for better type organization.

Applied to files:

  • src/lib/models/modelRegistry.ts
  • src/lib/factories/providerRegistry.ts
  • src/lib/adapters/providerImageAdapter.ts
  • docs/features/index.md
  • src/lib/constants/enums.ts
📚 Learning: 2025-09-02T13:50:42.770Z
Learnt from: YasmeenOgo
Repo: juspay/neurolink PR: 145
File: src/lib/core/types.ts:0-0
Timestamp: 2025-09-02T13:50:42.770Z
Learning: The APIVersions enum in src/lib/core/types.ts now contains comprehensive API version constants for all major AI providers: Azure OpenAI (latest, stable, legacy), OpenAI (current, beta), Google AI (current, beta), and Anthropic (current). This centralization helps avoid API version drift across the codebase.

Applied to files:

  • src/lib/models/modelRegistry.ts
  • src/lib/factories/providerRegistry.ts
  • src/lib/adapters/providerImageAdapter.ts
  • src/lib/constants/enums.ts
📚 Learning: 2025-09-17T18:14:34.960Z
Learnt from: RajuSudhar
Repo: juspay/neurolink PR: 173
File: src/lib/types/index.ts:58-62
Timestamp: 2025-09-17T18:14:34.960Z
Learning: RajuSudhar explained that in the Neurolink codebase, there are multiple ProviderConfig types causing inconsistency. One existing ProviderConfig type better suited the "ProviderConfig" name, so they renamed the less-suitable one to AIModelProviderConfig to free up the name. Adding backward compatibility aliases would worsen naming inconsistency rather than help. The remaining duplicates will be systematically deduplicated in the 07-Types-Module.md TODO as part of their phased refactor approach.

Applied to files:

  • src/lib/models/modelRegistry.ts
  • src/lib/factories/providerRegistry.ts
  • src/lib/adapters/providerImageAdapter.ts
  • src/lib/constants/enums.ts
📚 Learning: 2025-12-10T12:24:51.147Z
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: Applies to **/adapters/providerImageAdapter.ts : Update ProviderImageAdapter.VISION_CAPABILITIES and ProviderImageAdapter.adaptImageForProvider() when adding vision support for new models

Applied to files:

  • src/lib/models/modelRegistry.ts
  • src/lib/factories/providerRegistry.ts
  • src/lib/adapters/providerImageAdapter.ts
📚 Learning: 2025-12-10T12:24:51.147Z
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: Applies to **/providers/*.ts : Providers must extend a base provider or implement the provider interface and register in ProviderRegistry.registerAllProviders() with provider name, factory function, default model, and aliases

Applied to files:

  • src/lib/factories/providerRegistry.ts
📚 Learning: 2025-12-10T12:24:51.147Z
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: Applies to **/factories/providerRegistry.ts : All providers must be loaded via dynamic imports to break circular dependency chains in the ProviderRegistry

Applied to files:

  • src/lib/factories/providerRegistry.ts
📚 Learning: 2025-12-10T12:24:51.147Z
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: Applies to **/cli/factories/commandFactory.ts : Register CLI provider choices in src/cli/factories/commandFactory.ts when adding new providers

Applied to files:

  • src/lib/factories/providerRegistry.ts
📚 Learning: 2025-12-10T12:24:51.147Z
Learnt from: CR
Repo: juspay/neurolink PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T12:24:51.147Z
Learning: All providers must support the same core interface for consistency across the 12+ AI provider implementations

Applied to files:

  • src/lib/factories/providerRegistry.ts
  • docs/features/index.md
🧬 Code graph analysis (2)
src/lib/factories/providerRegistry.ts (1)
src/lib/index.ts (1)
  • VertexModels (41-41)
src/lib/constants/enums.ts (1)
src/lib/index.ts (2)
  • OpenAIModels (40-40)
  • VertexModels (41-41)
🔇 Additional comments (18)
test/unit/cli/video-flags.test.ts (1)

1-137: LGTM - Formatting-only changes.

The modifications are limited to whitespace adjustments (blank line in docblock, comment alignment). No functional changes to test logic or assertions.

docs/sdk/api-reference.md (2)

596-599: LGTM - Documentation formatting improvements.

Minor whitespace adjustments in the interface documentation. No content changes.


981-987: LGTM - Table formatting normalized.

Column widths and alignment standardized in the Office Document Provider Support table for consistency with other tables in the documentation.

docs/features/office-documents.md (1)

19-30: LGTM - Table formatting standardized.

Markdown tables reformatted with consistent column widths for better readability across the documentation.

docs/features/index.md (1)

28-51: LGTM - Table formatting normalized.

Column widths standardized in the Core Features and Platform Capabilities tables for visual consistency.

src/lib/constants/enums.ts (6)

33-35: Ordering consistency addressed.

The Claude 4.5 series now follows consistent Opus > Sonnet > Haiku ordering across BedrockModels, VertexModels, and AnthropicModels, addressing the previous review feedback.


372-418: New MistralModels enum is well-organized.

Comprehensive coverage of Mistral AI model families (Large, Medium, Small, Magistral, Ministral, Codestral, Devstral, Pixtral, Voxtral) with clear categorization comments.


420-518: OllamaModels enum provides good local model coverage.

Well-documented with descriptive comments for each model family. The enum covers major local model options (Llama, Qwen, DeepSeek, Mistral, Gemma, Phi, vision models, code models).


520-579: LiteLLMModels enum follows correct proxy prefix convention.

Models correctly use provider-specific prefixes (e.g., openai/, anthropic/, vertex_ai/, gemini/) matching LiteLLM's routing format.


27-169: BedrockModels expansion is comprehensive and well-structured.

The enum now covers Claude 4.x series, Amazon Nova/Titan families, Meta Llama series, Mistral AI models, and additional providers (Cohere, DeepSeek, Qwen, Gemma, AI21). Section comments improve navigability.


175-178: GPT-5.2 model additions are correct and follow established patterns.

The new GPT-5.2 series constants use appropriate identifiers consistent with OpenAI's naming conventions and the codebase's "-latest" suffix pattern. Model IDs align with documented December 2025 release variants.

src/lib/models/modelRegistry.ts (4)

347-392: GPT-5.2 registry entry looks correct.

The GPT-5.2 Thinking model entry aligns with the PR description:

  • Input: $0.00175/1K tokens ✓
  • Output: $0.014/1K tokens ✓
  • 256K context window ✓
  • Vision capability enabled ✓

440-484: GPT-5.2 Pro entry correctly configured.

Pricing and limits match the PR description (Input $0.021, Output $0.168, 128K max output).


1861-1905: NOVA_LITE entry added - addresses previous review feedback.

The missing BedrockModels.NOVA_LITE registry entry has been added with complete metadata, resolving the previous review comment about runtime lookup failures.


2347-2424: USE_CASE_RECOMMENDATIONS properly configured with valid model references.

All 28 models referenced across the 12 use cases (coding, creative, analysis, conversation, reasoning, translation, summarization, cost-effective, high-quality, fast, local, and multimodal) have corresponding entries in MODEL_REGISTRY. The prioritization of GPT-5.2 models for coding, reasoning, and high-quality use cases is appropriate.

src/lib/adapters/providerImageAdapter.ts (2)

28-31: GPT-5.2 vision capabilities correctly added.

The GPT-5.2 models are appropriately added to VISION_CAPABILITIES, consistent with their vision: true capability in the model registry.


398-412: New provider cases address previous review feedback.

The missing switch cases for huggingface, sagemaker, litellm, and mistral have been added, resolving the previous critical review comment.

src/lib/factories/providerRegistry.ts (1)

14-20: Good refactor: Enum-based defaults improve type safety.

The migration from hard-coded model strings to enum constants centralizes model definitions and reduces the risk of typos. All referenced enum values (AnthropicModels.CLAUDE_SONNET_4_0, VertexModels.CLAUDE_4_0_SONNET, HuggingFaceModels.QWEN_2_5_72B_INSTRUCT, MistralModels.MISTRAL_LARGE_LATEST, OllamaModels.LLAMA3_2_LATEST, and LiteLLMModels.OPENAI_GPT_4O_MINI) are properly defined in constants/enums.ts. Dynamic imports are preserved as required by the coding guidelines.

Comment on lines +217 to 220
// Mistral Large (latest has vision via Pixtral integration)
"mistral-large-latest",
"mistral-large-2512",
// Mistral Small 3.2 (vision support for images: PNG, JPEG, WEBP, GIF)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Inconsistency: Mistral Large vision capability mismatch.

mistral-large-latest and mistral-large-2512 are listed in VISION_CAPABILITIES (lines 218-219), but in MODEL_REGISTRY, MistralModels.MISTRAL_LARGE_LATEST has vision: false (modelRegistry.ts line 1326).

This inconsistency could lead to validation passing here but actual API calls failing.

Either:

  1. Remove non-vision Mistral models from VISION_CAPABILITIES:
   mistral: [
-    // Mistral Large (latest has vision via Pixtral integration)
-    "mistral-large-latest",
-    "mistral-large-2512",
     // Mistral Small 3.2 (vision support for images: PNG, JPEG, WEBP, GIF)
     "mistral-small",
  1. Or update MODEL_REGISTRY to set vision: true for Mistral Large if it actually supports vision.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/lib/adapters/providerImageAdapter.ts around lines 217-220 and
modelRegistry.ts at line 1326, there is a mismatch: two Mistral Large models are
listed in VISION_CAPABILITIES but the MODEL_REGISTRY marks Mistral Large as
vision:false. Fix by making the sources consistent: either remove
"mistral-large-latest" and "mistral-large-2512" from VISION_CAPABILITIES if they
do not support vision, or update MODEL_REGISTRY to set vision:true for
MistralModels.MISTRAL_LARGE_LATEST (and MISTRAL_LARGE_2512 if present) so the
registry matches capability checks; ensure both files reflect the same decision
and run validation/tests to confirm no API-call failures.

Comment on lines +410 to +411
case "bedrock":
adaptedPayload = this.formatForAnthropic(text, images);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Bedrock formatting may need model-specific routing.

The Bedrock provider routes all vision requests to formatForAnthropic, but VISION_CAPABILITIES.bedrock includes both Claude models (Anthropic format) and Amazon Nova models (lines 276-286). Nova models may require different image formatting through AWS's native Bedrock API.

Consider adding model-specific routing similar to formatForVertex:

       case "bedrock":
-        adaptedPayload = this.formatForAnthropic(text, images);
+        adaptedPayload = this.formatForBedrock(text, images, model);
         break;

And add a routing method:

private static formatForBedrock(
  text: string,
  images: Array<Buffer | string>,
  model: string,
): unknown {
  if (model.includes("claude") || model.includes("anthropic")) {
    return this.formatForAnthropic(text, images);
  } else if (model.includes("nova") || model.includes("amazon")) {
    // Nova models - may need specific formatting
    return this.formatForAnthropic(text, images); // Or implement Nova-specific format
  } else {
    return this.formatForAnthropic(text, images);
  }
}
🤖 Prompt for AI Agents
In src/lib/adapters/providerImageAdapter.ts around lines 410-411, the Bedrock
branch always calls formatForAnthropic which ignores model differences (Claude
vs Nova); add a formatForBedrock(model, text, images) router similar to
formatForVertex that checks the model string (e.g., contains "claude" or
"anthropic" → call formatForAnthropic; contains "nova" or "amazon" → implement
or call a Nova-specific image formatting helper) and default to Anthropics if
unknown, then update the switch case to call this new formatForBedrock with the
current model, text, and images so Bedrock uses model-specific formatting.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 AI Review & Build Compliance ✅

Status: AI analysis complete • Build rules validated • Ready for review

📊 View detailed analysis results

🛡️ Analysis Complete

  • ✅ Security scan (vulnerabilities, API keys)
  • ✅ TypeScript safety & code quality
  • ✅ Error handling & best practices
  • ✅ Build rule enforcement validated
  • ✅ Commit format & compliance checks

📋 Ready for Merge When

  • All CI checks passing
  • Manual review approved
  • Any AI-flagged issues resolved

🤖 AI analysis complete - check individual code comments for specific feedback

@murdore
murdore merged commit b75042f into release Dec 12, 2025
13 checks passed
@murdore
murdore deleted the feat/latest-model-update branch December 12, 2025 12:55
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 8.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants