Skip to content

ProviderConfig incorrectly uses same http_client for sync and async clients #187

@SheenKocher

Description

@SheenKocher

I found a bug in ProviderConfig (memori/core/providers.py) where the same http_client parameter is internally used for both synchronous and asynchronous LLM client creation.

Expected Behavior

Memori should allow separate configuration for:

  • sync_http_client
  • async_http_client

And use them correctly in:

  • create_client() → sync_http_client
  • create_async_client() → async_http_client

Actual Behavior

Both functions use the same http_client value, which breaks custom LLM providers that rely on different sync/async HTTP clients.

Reproduction

  1. Pass a custom synchronous client
  2. Pass a custom asynchronous client
  3. Memori uses the same client into both constructors

Proposed Fix

I have implemented the following changes in my fork:

  • Rename http_clientsync_http_client
  • Add new async_http_client field
  • Update create_client() and create_async_client() accordingly
  • Add backward compatibility for older configs

I will open a Pull Request referencing this Issue.

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