Repository navigation
Feat/OpenAI compatible provider - #23
Open
timotheegath wants to merge 9 commits into
Open
timotheegath wants to merge 9 commits into
timotheegath wants to merge 9 commits into
Conversation
Subclasses OpenAIClient so the Responses API, tool-call handling, retries, and usage accounting are inherited unchanged; only the base URL and API key resolution is added. Both default to the OPENAI_COMPATIBLE_BASE_URL / OPENAI_COMPATIBLE_API_KEY env vars from .env and raise a clear error when unset. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Adds the lazy-loading entry so the client is importable from the public clients namespace like the other providers. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Registers the provider in get_client_instance (resolving base_url/api_key from the openai_compatible config block or OPENAI_COMPATIBLE_* env vars), get_model_name, and extract_model_info; adds openai-compatible/openai_compat aliases and lists the provider in the unknown-provider error. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…example Template entries for the new openai_compatible provider; real values stay in the gitignored .env. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Adds an openai_compatible llm block (model/params plus commented base_url and env-var overrides) and lists the provider in the provider comment, matching how the other providers are shown. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Mirrors test_grok_client.py: mocks the openai SDK, then covers env-based base URL/API key resolution, custom env var names, explicit-arg overrides, the missing-credential errors, and a Responses API passthrough keeping temperature for a non-restricted model. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Extends the existing namespace smoke test with the new client in clients.__all__ and adds an openai-compatible -> openai_compatible alias test mirroring the foundary/xai ones. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
… field The trajectory 'reasoning' field was filled from response_str (output_text only), so reasoning-model turns that emit reasoning + tool calls logged an empty string. Extract text from reasoning output items (both OpenAI-style summary parts and gateway-style reasoning_text content parts, e.g. OpenRouter) and prefer it over output_text; message text remains available in the response_output_text diagnostic. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Let the environment use a custom Open-AI-compatible LLM provider be use for inference for all environments.
Desired behaviour
Implementation notes
OpenAICompatibleClientsubclassesOpenAIClient, as by design the specs should be nearly identical. The only difference is endpoint specs and credentials handling.