Skip to content

Support Custom API#105

Merged
jgieringer merged 14 commits intomainfrom
jgieringer/custom-api
Feb 19, 2026
Merged

Support Custom API#105
jgieringer merged 14 commits intomainfrom
jgieringer/custom-api

Conversation

@jgieringer
Copy link
Collaborator

@jgieringer jgieringer commented Feb 11, 2026

Description

This PR serves as an example for developers bringing a custom endpoint.
This example also makes use of #104 where a conversation_id can be sent to the API and #107 where provider can start the conversation.
If the API rejects the initial conversation_id and returns its own, the client overwrites the initial with the API's conversation_id 🚀

Base automatically changed from jgieringer/convo-id to main February 12, 2026 23:38
Copy link
Collaborator

@emily-vanark emily-vanark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “custom endpoint” LLM client implementation so developers can integrate an external chat API, including support for per-conversation conversation_id updates as introduced in PR #104.

Changes:

  • Introduces EndpointLLM (aiohttp-based) and wires it into LLMFactory via endpoint-* model names.
  • Adds endpoint configuration via environment variables and extends .env.example.
  • Adds unit tests and fixtures for the new endpoint client.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
llm_clients/endpoint_llm.py New custom endpoint LLM client using aiohttp + conversation_id metadata handling
llm_clients/config.py Adds endpoint-related env vars and get_endpoint_config()
llm_clients/llm_factory.py Allows creating EndpointLLM; updates judge-model error message
llm_clients/llm_interface.py Tweaks conversation_id overwrite logic to ignore empty/same IDs
llm_clients/__init__.py Documents support for endpoint / endpoint-*
.env.example Adds example endpoint env vars
tests/unit/llm_clients/test_endpoint_llm.py New unit tests for EndpointLLM
tests/unit/llm_clients/conftest.py Adds mock_endpoint_config fixture

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jgieringer jgieringer merged commit 96a9347 into main Feb 19, 2026
@jgieringer jgieringer deleted the jgieringer/custom-api branch February 19, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants