Skip to content

consolidation: integrations/ orphan directory (no __init__.py) — merge into middleware/ or add contract #111

@Gradata

Description

@Gradata

Problem

src/gradata/integrations/ has no __init__.py and therefore no public contract. It contains four provider adapters (OpenAI, Anthropic, LangChain, CrewAI) plus embeddings.py and session_history.py.

src/gradata/middleware/ contains the same four provider adapters (via wrap_anthropic, wrap_openai, etc.) as the canonical surface.

This is effectively one surface with an orphaned sibling. integrations/openai_adapter.py and integrations/anthropic_adapter.py already carry deprecation warnings pointing to middleware.wrap_*.

Proposed resolution

Either:

A. Complete the migration: Delete the deprecated integrations/openai_adapter.py and integrations/anthropic_adapter.py (they've been deprecated; schedule v0.8.0 cleanup). Move embeddings.py and session_history.py somewhere with a clear home (likely adapters/ or their own module). Delete integrations/ as a directory.

B. Give integrations/ a contract: Add __init__.py with __all__ documenting what lives here and why it's separate from middleware/.

Option A is the likely right answer given the deprecation warnings already in place.

Context

Found by council architectural review of autoresearch/consolidation. The directory is invisible to help(gradata.integrations) — anyone adding a 5th adapter won't know the 4 existing ones are there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions