Skip to content

feat: add GPT-5 model family support #92#140

Merged
bahdan111 merged 15 commits intodevelopmentfrom
feat-add-support-for-gpt-5-models
Feb 18, 2026
Merged

feat: add GPT-5 model family support #92#140
bahdan111 merged 15 commits intodevelopmentfrom
feat-add-support-for-gpt-5-models

Conversation

@bahdan111
Copy link
Contributor

@bahdan111 bahdan111 commented Feb 13, 2026

Applicable issues

Description of changes

Adds GPT-5 model family support with conditional parameter handling:

  • New models: GPT_5_MINI, GPT_5_1, GPT_5_2
  • New enums: ReasoningEffortEnum, VerbosityEnum
  • LLMModelConfig Pydantic validator enforces model-family constraints:
    • GPT-5: rejects seed, requires reasoning_effort, validates temperature=1 when reasoning is enabled
    • Non-GPT-5: rejects reasoning_effort and verbosity
  • Refactored get_chat_model() - moved params validation into LLMModelConfig
  • Removed unused **kwargs from get_chat_model() and get_embeddings_model()
  • Moved reasoning_effort and verbosity defaults out of LangChainSettings into LLMModelConfig
  • Default model remains GPT-4.1
  • Fix bug with default embedding model incorrectly set in channel config, correct assignment: llm_model: Mapped[str] = mapped_column( default=langchain_settings.embedding_default_model.value )

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@bahdan111 bahdan111 changed the title Feat add support for gpt 5 models feat: add support for gpt 5 models Feb 13, 2026
@bahdan111
Copy link
Contributor Author

bahdan111 commented Feb 13, 2026

/deploy-review

GitHub actions run: 21990045205
Environment URL: review-environment | pipeline

@bahdan111 bahdan111 changed the title feat: add support for gpt 5 models feat: add GPT-5 model family support Feb 13, 2026
@bahdan111 bahdan111 changed the title feat: add GPT-5 model family support feat: add GPT-5 model family support #92 Feb 13, 2026
@navalnica
Copy link
Contributor

phrase "partially fixes #" will likely close original issue. maybe rephrase?

@Fedir-Yatsenko Fedir-Yatsenko self-requested a review February 13, 2026 16:07
@Fedir-Yatsenko Fedir-Yatsenko added enhancement New feature or request python Pull requests that update python code labels Feb 13, 2026
@bahdan111
Copy link
Contributor Author

bahdan111 commented Feb 16, 2026

/deploy-review

GitHub actions run: 22065546129
Environment URL: review-environment | pipeline

Bahdan Kapionkin added 2 commits February 16, 2026 16:27
@bahdan111
Copy link
Contributor Author

bahdan111 commented Feb 16, 2026

/deploy-review

GitHub actions run: 22066587191
Environment URL: review-environment | pipeline

@navalnica
Copy link
Contributor

navalnica commented Feb 16, 2026

there is a bug in statgpt.common.common.models.Channel:

  • it specifies embedding model to be used by a channel, in llm_model field (field name is incorrect. and it likely led to the error below)
  • the default value for llm_model field uses LLM model, not embedding model:
llm_model: Mapped[str] = mapped_column(default=langchain_settings.default_model.value)

I suggest we use:

llm_model: Mapped[str] = mapped_column(default=langchain_settings.embedding_default_model.value)

and delete default value in EmbeddingsModelConfig:

class EmbeddingsModelConfig(BaseModelConfig):
    """Config for embeddings models."""

    deployment: EmbeddingModelsEnum = Field(
        description="The deployment of the model in DIAL"
    )

@Fedir-Yatsenko what do you think?

@bahdan111
Copy link
Contributor Author

bahdan111 commented Feb 17, 2026

/deploy-review

GitHub actions run: 22094853247
Environment URL: review-environment | pipeline

@bahdan111
Copy link
Contributor Author

bahdan111 commented Feb 17, 2026

there is a bug in statgpt.common.common.models.Channel:

  • it specifies embedding model to be used by a channel, in llm_model field (field name is incorrect. and it likely led to the error below)
  • the default value for llm_model field uses LLM model, not embedding model:
llm_model: Mapped[str] = mapped_column(default=langchain_settings.default_model.value)

I suggest we use:

llm_model: Mapped[str] = mapped_column(default=langchain_settings.embedding_default_model.value)

and delete default value in EmbeddingsModelConfig:

class EmbeddingsModelConfig(BaseModelConfig):
    """Config for embeddings models."""

    deployment: EmbeddingModelsEnum = Field(
        description="The deployment of the model in DIAL"
    )

@Fedir-Yatsenko what do you think?

shall we move to separate PR, I would also like to change misleading name "llm_model" and we would have to migrate db after. @navalnica

@Fedir-Yatsenko
Copy link
Collaborator

shall we move to separate PR, I would also like to change misleading name "llm_model" and we would have to migrate db after. @navalnica

Let's first create an issue and then discuss it. If you want to change this, let's remove this column. Essentially, this parameter should be part of the Data Query config, not the channel.

@navalnica
Copy link
Contributor

there is a bug in statgpt.common.common.models.Channel:

  • it specifies embedding model to be used by a channel, in llm_model field (field name is incorrect. and it likely led to the error below)
  • the default value for llm_model field uses LLM model, not embedding model:
llm_model: Mapped[str] = mapped_column(default=langchain_settings.default_model.value)

I suggest we use:

llm_model: Mapped[str] = mapped_column(default=langchain_settings.embedding_default_model.value)

and delete default value in EmbeddingsModelConfig:

class EmbeddingsModelConfig(BaseModelConfig):
    """Config for embeddings models."""

    deployment: EmbeddingModelsEnum = Field(
        description="The deployment of the model in DIAL"
    )

@Fedir-Yatsenko what do you think?

shall we move to separate PR, I would also like to change misleading name "llm_model" and we would have to migrate db after. @navalnica

let's change the varname in another PR

@bahdan111
Copy link
Contributor Author

bahdan111 commented Feb 18, 2026

/deploy-review

GitHub actions run: 22131897847
Environment URL: review-environment | pipeline

@navalnica
Copy link
Contributor

created follow-up issue to refactor langchain configs #150

@bahdan111 bahdan111 marked this pull request as ready for review February 18, 2026 11:15
@bahdan111 bahdan111 requested a review from ypldan as a code owner February 18, 2026 11:15
@bahdan111 bahdan111 merged commit 5566e76 into development Feb 18, 2026
9 checks passed
@bahdan111 bahdan111 deleted the feat-add-support-for-gpt-5-models branch February 18, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants