Skip to content

Rewrite with pydantic-ai #20

Open
Open
@vrslev

Description

@vrslev

@xfenix proposed making any-llm-client a lightweight wrapper around pydantic-ai to avoid competition with it. I agree that this is a good idea, as it will clarify the purpose of any-llm-client and reduce the maintenance burden.

I envision this as a thin layer that allows us to configure the LLM using environment variables, enabling us to switch LLMs without changing the code—only the configuration.

To implement this, we need to:

  • Add support for YandexGPT,
  • Create a custom OpenAI provider that supports request_extra,
  • Refactor the code so that any_llm_client.get_client() returns pydantic_ai.Model.
  • Add helper that would reraise OutOfTokensOrSymbolsError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions