Skip to content

Custom URL ability or generic bridges? #114

@wiretail

Description

@wiretail

The API URL's appear to be hard-coded, such as in /src/Bridge/OpenAI/GPT/ModelClient.php for example. These API surfaces are widely compatible with many other providers and some local/private options, and it also seems less than ideal for the project to curate the "supported providers" while also making it less easy to use others.

Would it make sense to optionally specify the API URL in the constructor? (similar to /src/platform/src/Bridge/Ollama/LlamaModelHandler.php but with a default)

Not my favorite approach, as it not being an OpenAI GPT model while called that is a bit ugly -- but alternatively a \Bridge\OpenAI\Generic\ModelClient could be added for this specific purpose, so it's obvious in code an alternative provider is being used.

You can add your own of course, but this would keep it easier to use other models, and also probably keep the flood of "add every provider" type requests down. I know OpenRouter is included, but there are many other aggregators too. (And while its easy to automatically swap OpenRouter targets in different environments, this can also be handy with direct models.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureNew featurePlatformIssues & PRs about the AI Platform componentRFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions