refactor(constants): enforce ModelConstants — replace hardcoded model strings (#3528)#3542
Merged
mrveiss merged 2 commits intoDev_new_guifrom Apr 5, 2026
Merged
refactor(constants): enforce ModelConstants — replace hardcoded model strings (#3528)#3542mrveiss merged 2 commits intoDev_new_guifrom
mrveiss merged 2 commits intoDev_new_guifrom
Conversation
✅ SSOT Configuration Compliance: Passing🎉 No hardcoded values detected that have SSOT config equivalents! |
…BACK_PATTERNS, test file, claude-sonnet-4-6 (#3528)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces 40+ hardcoded model name strings across 14 files with constants from
constants/model_constants.py. Consolidates three duplicateMODEL_PRICINGdictionaries into a single authoritative source.model_constants.pyadditionsOPENAI_GPT4,OPENAI_GPT35_TURBO,ANTHROPIC_CLAUDE3_OPUS_DATED,GOOGLE_GEMINI_PRO_VISION, etc.)EXPENSIVE_MODEL_MARKER_OPUS,EXPENSIVE_MODEL_MARKER_GPT4MODEL_PRICING_PER_1M_TOKENS,MODEL_PRICING_PER_1K_TOKENS,MODEL_COSTS_PER_1M_TOKENSFiles updated
constants/model_constants.pyservices/llm_cost_tracker.pyMODEL_PRICINGdict →MODEL_PRICING_PER_1M_TOKENSimportmodern_ai_integration.pyllm_multi_provider.pyllm_interface_pkg/providers/openai_provider.py"gpt-3.5-turbo"fallback →OPENAI_GPT35_TURBOmodels/settings.pyOPENAI_GPT35_TURBOapi/analytics_llm_patterns.pyEXPENSIVE_MODELSset +MODEL_COSTSdict + substring checks → constantscode_intelligence/llm_pattern_analysis/calculators.pycode_intelligence/llm_pattern_analysis/data_models.pyexpensive_markerslist → constantsllm_providers/openai_provider.pyllm_providers/anthropic_provider.pyservices/analytics_service.pyapi/llm_providers.pyCloses #3528