Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bb7b88c
add new models enums
Jan 20, 2026
8784ca4
Merge branch 'development' into 92-switch-to-gpt5-models
Feb 2, 2026
4536223
add gpt 5 family support
Feb 2, 2026
615702a
upd default configs
Feb 2, 2026
9e98dcd
change default model back to 4.1
Feb 3, 2026
b48cf3b
set default to 5.1
Feb 3, 2026
3fe8ff6
change default to 5.2
Feb 3, 2026
b5ee249
upd defaults llms for hybrid search
Feb 3, 2026
e5f044c
upd default llms for hybrid search
Feb 3, 2026
a9960ad
switch hybrid indexing to minimal effort
Feb 4, 2026
d418829
set temp to 1 for other reasoning levels
Feb 4, 2026
2589a92
Merge branch 'development' into 92-switch-to-gpt5-models
Feb 5, 2026
bbdcdc8
Merge branch 'development' into 92-switch-to-gpt5-models
Feb 12, 2026
2531312
Merge branch 'development' into 92-switch-to-gpt5-models
Feb 19, 2026
ac24314
remove unused import
Feb 19, 2026
eccd61c
Potential fix for code scanning alert no. 48: Clear-text logging of s…
bahdan111 Feb 19, 2026
7a565e4
reformat
Feb 19, 2026
bd3f8ea
Merge branch '92-switch-to-gpt5-models' of https://github.com/epam/st…
Feb 19, 2026
6d39a70
reformat
Feb 19, 2026
1b431d9
add temperature to configs
Feb 19, 2026
0c48f10
add seed to configs
Feb 19, 2026
dc235d9
Merge branch 'development' into 92-switch-to-gpt5-models
Feb 19, 2026
5c062be
change default model back to 4.1
Feb 23, 2026
6a47f43
fix: add temperature for indexing models
Feb 23, 2026
03f6b58
Merge branch 'development' into 92-switch-to-gpt5-models
Feb 24, 2026
65b3233
Merge branch 'development' into 92-switch-to-gpt5-models
Feb 27, 2026
6b47b9b
Merge branch 'development' into 92-switch-to-gpt5-models
Mar 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions configurations/clients/sample/channels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,18 @@ channels:
datasets, as it contains data directly provided by national statistical
agencies.
llm_model_config:
deployment: "gpt-4.1-2025-04-14"
deployment: "gpt-5.2-2025-12-11"
reasoningEffort: "none"
verbosity: "low"
temperature: 1
seed: null
out_of_scope:
llm_model_config:
deployment: "gpt-4.1-2025-04-14"
deployment: "gpt-5.2-2025-12-11"
reasoningEffort: "none"
verbosity: "low"
temperature: 1
seed: null
use_general_topics_blacklist: true
domain: "Statistics, economics and SDMX."
token_usage:
Expand Down
59 changes: 42 additions & 17 deletions configurations/clients/sample/tools.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,54 @@
_available_datasets_call_id: &available_datasets_call_id "call_EBJJeaOMKeCzm8h378ubURQN"
_available_terms_tool_call_id: &availableTermsCallId "call_EBJJeaOMKeCzm8h378ubU003"
_data_query_gpt_41_models: &data-query-gpt-41-models
_data_query_gpt_5_models: &data-query-gpt-5-models
datasetsSelectionModelConfig:
deployment: "gpt-4.1-2025-04-14"
temperature: 0.0
deployment: "gpt-5.2-2025-12-11"
reasoningEffort: "none"
verbosity: "low"
temperature: 1
seed: null
dimensionsSelectionModelConfig:
deployment: "gpt-4.1-2025-04-14"
temperature: 0.0
deployment: "gpt-5.2-2025-12-11"
reasoningEffort: "none"
verbosity: "low"
temperature: 1
seed: null
indicatorsSelectionModelConfig:
deployment: "gpt-4.1-2025-04-14"
temperature: 0.0
deployment: "gpt-5.2-2025-12-11"
reasoningEffort: "none"
verbosity: "low"
temperature: 1
seed: null
incompleteQueriesModelConfig:
deployment: "gpt-4.1-2025-04-14"
deployment: "gpt-5.2-2025-12-11"
reasoningEffort: "none"
verbosity: "low"
temperature: 1
seed: null
groupExpanderModelConfig:
deployment: "gpt-4.1-2025-04-14"
temperature: 0.0
deployment: "gpt-5.2-2025-12-11"
reasoningEffort: "none"
verbosity: "low"
temperature: 1
seed: null
namedEntitiesModelConfig:
deployment: "gpt-4.1-2025-04-14"
temperature: 0.0
deployment: "gpt-5.2-2025-12-11"
reasoningEffort: "none"
verbosity: "low"
temperature: 1
seed: null
queryNormalizationModelConfig:
deployment: "gpt-4.1-2025-04-14"
temperature: 0.0
deployment: "gpt-5.2-2025-12-11"
reasoningEffort: "none"
verbosity: "low"
temperature: 1
seed: null
timePeriodModelConfig:
deployment: "gpt-4.1-2025-04-14"
temperature: 0.0
deployment: "gpt-5.2-2025-12-11"
reasoningEffort: "none"
verbosity: "low"
temperature: 1
seed: null
_relevancy_prompts: &relevancy_prompts
systemMessage: |-
You are an expert in statistical indicators.
Expand Down Expand Up @@ -119,7 +144,7 @@ tools:
namedEntitiesToRemove: ["Country/Reference area", "Counterpart area/country"]
prompts:
relevancyPrompts: *relevancy_prompts
llmModels: *data-query-gpt-41-models
llmModels: *data-query-gpt-5-models
attachments:
customTable:
enabledStr: "True"
Expand Down
16 changes: 13 additions & 3 deletions statgpt/common/schemas/data_query_tool.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from pydantic import Field, PositiveInt, TypeAdapter, field_validator
from pydantic_core.core_schema import FieldValidationInfo

from statgpt.common.config import LLMModelsEnum
from statgpt.common.config import LLMModelsEnum, ReasoningEffortEnum, VerbosityEnum
from statgpt.common.config.utils import replace_env

from .base import BaseYamlModel, SystemUserPrompt
Expand Down Expand Up @@ -170,11 +170,21 @@ class HybridSearchConfig(BaseYamlModel):

normalize_model_config: LLMModelConfig = Field(
description="LLM Model used for normalization",
default_factory=lambda: LLMModelConfig(deployment=LLMModelsEnum.GPT_4_1_MINI_2025_04_14),
default_factory=lambda: LLMModelConfig(
deployment=LLMModelsEnum.GPT_5_MINI_2025_08_07,
reasoning_effort=ReasoningEffortEnum.MINIMAL,
verbosity=VerbosityEnum.LOW,
temperature=1,
),
)
harmonize_model_config: LLMModelConfig = Field(
description="LLM Model used for harmonization",
default_factory=lambda: LLMModelConfig(deployment=LLMModelsEnum.GPT_4_1_MINI_2025_04_14),
default_factory=lambda: LLMModelConfig(
deployment=LLMModelsEnum.GPT_5_MINI_2025_08_07,
reasoning_effort=ReasoningEffortEnum.MINIMAL,
verbosity=VerbosityEnum.LOW,
temperature=1,
),
)

# ~~~~~~~~~~ Search config ~~~~~~~~~~
Expand Down
17 changes: 16 additions & 1 deletion statgpt/common/settings/langchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
from pydantic import Field
from pydantic_settings import BaseSettings, SettingsConfigDict

from statgpt.common.config.llm_models import EmbeddingModelsEnum, LLMModelsEnum
from statgpt.common.config.llm_models import (
EmbeddingModelsEnum,
LLMModelsEnum,
ReasoningEffortEnum,
VerbosityEnum,
)


class LangChainSettings(BaseSettings):
Expand Down Expand Up @@ -38,6 +43,16 @@ class LangChainSettings(BaseSettings):
description="Default seed for reproducible outputs",
)

default_reasoning_effort: ReasoningEffortEnum | None = Field(
default=ReasoningEffortEnum.NONE,
description="Default reasoning effort for GPT-5 models (none/minimal/low/medium/high/xhigh)",
)

default_verbosity: VerbosityEnum | None = Field(
default=VerbosityEnum.LOW,
description="Default verbosity for GPT-5 models (low/medium/high). None means use model default.",
)

# Debugging settings
verbose: bool = Field(default=False, description="Enable verbose mode for LangChain")

Expand Down
14 changes: 4 additions & 10 deletions statgpt/common/utils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,10 @@ def get_chat_model(
params.update(model_config.model_dump(mode="json", exclude_none=True, exclude={"deployment"}))

if model_config.deployment.is_gpt_41_family:
callback = BrokenResponseInterceptor(regex_pattern=r'\s{5,}')
params.setdefault('callbacks', []).append(callback)
callback = BrokenResponseInterceptor(regex_pattern=r"\s{5,}")
params.setdefault("callbacks", []).append(callback)

api_key_log = f'{api_key.get_secret_value()[:3]}*****{api_key.get_secret_value()[-2:]}'
logger.info(
f'creating langchain LLM with the following params: {params}, Api key: {api_key_log}'
)
logger.info(f"creating langchain LLM with the following params: {params}")
return AzureChatOpenAI.model_validate(params)


Expand All @@ -56,8 +53,5 @@ def get_embeddings_model(
max_retries=10,
api_key=api_key, # since we use SecretStr, it won't be logged
)
api_key_log = f'{api_key.get_secret_value()[:3]}*****{api_key.get_secret_value()[-2:]}'
logger.info(
f'creating langchain embeddings with the following params: {params}, Api key: {api_key_log}'
)
logger.info(f"creating langchain embeddings with the following params: {params}")
return AzureOpenAIEmbeddings.model_validate(params)
Loading