Skip to content

Consolidate the two parallel model-adapter layers (models/providers vs integrations) #429

Description

@jeremymanning

Verified on main today.

Evidence

Two independent adapter layers ship in the same wheel:

src/orchestrator/models/providers/     src/orchestrator/integrations/
  base.py                                anthropic_model.py
  anthropic_provider.py                  google_model.py
                                         openai_model.py
                                         huggingface_model.py
                                         lazy_huggingface_model.py
                                         ollama_model.py
                                         lazy_ollama_model.py

class AnthropicModel is defined twicemodels/anthropic_model.py:24 and integrations/anthropic_model.py:27.

Why this matters now

This is the root cause of a user-visible packaging inconsistency: pyproject.toml advertises openai and google extras, but models/providers/ contains only anthropic_provider.py. The extras point at the integrations/ layer, which was never included in the Anthropic-only direction of #426. So the declared provider surface and the supported provider surface disagree.

It is also the likely source of the duplicated provider-registration warnings on startup.

Decision required

The ADR (docs/adr/0001-product-contract.md) names Anthropic as the only supported live provider. Two options:

  1. Adopt models/providers/ as canonical, delete the integrations/ adapters, and drop the openai/google extras. Honest and smallest, but removes non-Anthropic support that partly exists today.
  2. Keep integrations/ for breadth, make models/providers/ a thin façade over it, and restore real openai/google provider implementations so the extras are not misleading.

Recommend (1), consistent with the ADR — but this is a product decision tied to #426 and should be resolved alongside it.

Acceptance criteria

  • Exactly one AnthropicModel class in the package
  • Every extra in pyproject.toml corresponds to code that actually exists
  • import orchestrator; orchestrator.init_models() emits no duplicate-provider warnings

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureRelated to toolbox design/architectureenhancementNew feature or requesthigh-priorityCritical issue that needs to be addressed ASAP

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions