Skip to content

Document Tuning Engines OpenAI-compatible configuration#5981

Open
cerebrixos wants to merge 1 commit into
crewAIInc:mainfrom
cerebrixos:tuning-engines-openai-compatible-docs
Open

Document Tuning Engines OpenAI-compatible configuration#5981
cerebrixos wants to merge 1 commit into
crewAIInc:mainfrom
cerebrixos:tuning-engines-openai-compatible-docs

Conversation

@cerebrixos
Copy link
Copy Markdown

@cerebrixos cerebrixos commented May 30, 2026

Summary

  • Adds a small documentation example showing how to point this project’s existing OpenAI-compatible configuration at Tuning Engines.
  • Keeps this project’s APIs and runtime behavior unchanged: no new dependency, adapter, or code path.
  • Shows a path for teams to keep this framework in charge of app, agent, tool, workflow, or retrieval logic while routing model calls through a governed OpenAI-compatible endpoint.

Why this belongs here

Tuning Engines is an AI control plane for teams that want centralized model access, routing, tenant-scoped keys, policy/guardrail checks, audit logs, traces, approvals, and usage/cost visibility around existing AI applications.

This project already supports OpenAI-compatible endpoints. The docs change makes that existing capability discoverable for users who want governance and observability without rewriting their application around a separate SDK or changing this project’s runtime behavior.

Testing

  • git diff --check

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

📝 Walkthrough

Walkthrough

This PR adds a new documentation example demonstrating how to configure an LLM instance to connect to a Tuning Engines OpenAI-compatible endpoint. The example shows passing model, api_key, and base_url parameters to create the LLM, then wiring it into an Agent.

Changes

Tuning Engines OpenAI-compatible endpoint documentation

Layer / File(s) Summary
Tuning Engines endpoint configuration example
docs/en/learn/llm-connections.mdx
New code example added under the "Connecting to OpenAI-Compatible LLMs" section demonstrating LLM setup for Tuning Engines with model, API key, and custom base URL, then integrated into an Agent.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🐰 A doc update hops into view,
Tuning Engines shining bright and new,
Just eleven lines of learning light,
To guide the agents true and right!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: adding documentation for Tuning Engines OpenAI-compatible configuration. It is concise, clear, and directly relates to the changeset's primary purpose.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/en/learn/llm-connections.mdx (1)

160-161: 💤 Low value

Consider a more neutral comment tone.

The comment lists specific features ("model routing, policy controls, audit logs...") which reads somewhat promotional. Compare with the Google example on line 171 which uses a simpler, more neutral description: # Example using Gemini's OpenAI-compatible API.

Consider simplifying to something like:

# Example using Tuning Engines OpenAI-compatible endpoint

This aligns better with the documentation style of other examples while still being descriptive.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/en/learn/llm-connections.mdx` around lines 160 - 161, Replace the
promotional comment line beginning with "# Governed OpenAI-compatible endpoint
for model routing, policy controls, audit logs, traces, approvals, and cost
visibility." with a shorter, more neutral comment such as "# Example using
Tuning Engines OpenAI-compatible endpoint" so it matches the tone of the other
examples (e.g., the Google/Gemini example) and keeps the description concise and
factual.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/en/learn/llm-connections.mdx`:
- Around line 159-168: Update the Tuning Engines example in the LLM snippet to
use an actual supported model ID and neutral wording: replace
model="gpt-4o-mini" with a verified Tuning Engines model ID (or cite the exact
model/source in a short parenthetical), keep the LLM(...) and Agent(...) usage
but ensure base_url="https://api.tuningengines.com/v1" remains consistent with
an OpenAI-compatible gateway, and change the leading comment to a neutral
instructional sentence (e.g., "Example showing how to configure an
OpenAI-compatible gateway for model routing and policy controls") instead of
promotional language; ensure references to the LLM class, model parameter,
base_url, and Agent class are updated accordingly.

---

Nitpick comments:
In `@docs/en/learn/llm-connections.mdx`:
- Around line 160-161: Replace the promotional comment line beginning with "#
Governed OpenAI-compatible endpoint for model routing, policy controls, audit
logs, traces, approvals, and cost visibility." with a shorter, more neutral
comment such as "# Example using Tuning Engines OpenAI-compatible endpoint" so
it matches the tone of the other examples (e.g., the Google/Gemini example) and
keeps the description concise and factual.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 12745f3c-60bf-44fc-acc2-b47422c1ca6b

📥 Commits

Reviewing files that changed from the base of the PR and between 5cdc420 and 9c11603.

📒 Files selected for processing (1)
  • docs/en/learn/llm-connections.mdx

Comment on lines +159 to +168
```python Tuning Engines
# Governed OpenAI-compatible endpoint for model routing,
# policy controls, audit logs, traces, approvals, and cost visibility.
llm = LLM(
model="gpt-4o-mini",
api_key="your-tuning-engines-key",
base_url="https://api.tuningengines.com/v1"
)
agent = Agent(llm=llm, ...)
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify the Tuning Engines endpoint is accessible

# Check if the endpoint is publicly accessible
curl -I -s -o /dev/null -w "%{http_code}" https://api.tuningengines.com/v1 || echo "Failed to connect"

Repository: crewAIInc/crewAI

Length of output: 63


🌐 Web query:

Tuning Engines API base URL documentation

💡 Result:

Tuning Engines API base URL (from available integration docs/examples): https://api.tuningengines.com/v1 [1][2] Evidence notes: - Multiple community/developer integration examples reference the base URL as https://api.tuningengines.com/v1 (e.g., OpenAI-compatible setup examples mention “Base URL: https://api.tuningengines.com/v1”). [1][3] - The tuning-engines CLI documents a configurable “TE_API_URL” with a different default of https://app.tuningengines.com (this appears to be the CLI/UI backend, not the public versioned API gateway). [4][5] Practical guidance: - If you are calling the versioned REST/OpenAI-compatible API directly, use https://api.tuningengines.com/v1 as the base URL. [1][3] - If you are using the tuning-engines CLI, set TE_API_URL explicitly if your environment expects the API gateway; otherwise it defaults to https://app.tuningengines.com. [4][5]

Citations:


🌐 Web query:

Tuning Engines supported OpenAI models

💡 Result:

As of 2026-05-30, the OpenAI fine-tuning API supports creating fine-tuning jobs only for specific base models (and the set is shrinking as OpenAI winds down fine-tuning). The base models explicitly referenced by OpenAI for fine-tuning include: 1) gpt-4o-mini-2024-07-18 [1] 2) gpt-4o-2024-08-06 [2] 3) gpt-4.1-2025-04-14 [3] 4) gpt-4.1-mini-2025-04-14 [3] 5) gpt-4.1-nano-2025-04-14 [3] 6) o4-mini (reinforcement fine-tuning method is supported, and OpenAI notes o4-mini for RL fine-tuning availability) [4] 7) gpt-3.5-turbo (legacy name appears as selectable in the fine_tuning resource reference) [5] 8) babbage-002 (legacy name appears as selectable in the fine_tuning resource reference) [5] 9) davinci-002 (legacy name appears as selectable in the fine_tuning resource reference) [5] Important constraints (time sensitivity): - OpenAI is “winding down” the fine-tuning platform; it is no longer accessible to new users, while existing users can create training jobs for coming months [3]. - OpenAI provides a deprecations page with shutdown dates and notes on training-job availability restrictions (e.g., creation restrictions for orgs that have not previously fine-tuned, and later hard shutdown for new fine-tune jobs) [6]. Note: “Tuning Engines” are distinct from OpenAI fine-tuning. The term “Tuning Engines supported OpenAI models” can also mean third-party services (like Tuning Engines) that tune open models and may support “OpenAI-compatible” endpoints; that’s not the same as OpenAI’s fine-tuning API base-model support. The official OpenAI fine-tuning support is the list above from OpenAI’s docs and references [5][3][1][2].

Citations:


🏁 Script executed:

#!/bin/bash
# Check if the base URL behaves like a valid OpenAI-compatible gateway (should be 401/403/404 depends on auth)
set -euo pipefail

BASE="https://api.tuningengines.com/v1"

for path in "" "/models" "/chat/completions" "/responses"; do
  url="${BASE}${path}"
  echo "== $url =="
  curl -sS -o /dev/null -w "HTTP_CODE=%{http_code}\n" -I "$url" || echo "curl_failed"
done

Repository: crewAIInc/crewAI

Length of output: 306


🌐 Web query:

Tuning Engines gpt-4o-mini supported models OpenAI compatible base_url /v1

💡 Result:

Tuning Engines gpt-4o-mini supported models, OpenAI-compatible base_url (/v1) I couldn’t find any authoritative/official Tuning Engines documentation stating (a) which exact base/fine-tunable model IDs (including gpt-4o-mini variants) are supported and (b) whether their platform exposes an OpenAI-compatible API with a base_url that includes /v1. What I did find (related, but not the requested “Tuning Engines” API compatibility): 1) Tuning Engines is described as a managed fine-tuning platform for (open-source) models via their agents/CLI, not as an OpenAI-compatible endpoint for OpenAI-hosted models. Their site and CLI emphasize fine-tuning open models like Qwen, Llama, DeepSeek, Mistral, Gemma, etc. [1][2] 2) OpenAI’s own API docs show GPT-4o-mini fine-tuning availability for the base model name gpt-4o-mini and the snapshot gpt-4o-mini-2024-07-18. [3][4] 3) For OpenAI-compatible clients, the “/v1” base path is standard for OpenAI’s API (e.g., POST https://api.openai.com/v1/fine_tuning/jobs). [4][5] 4) For OpenAI-compatible clients targeting Azure OpenAI, Microsoft’s tutorial shows base_url formatted as https://.openai.azure.com/openai/v1/ when using the OpenAI SDK. [6][7] Practical takeaway: - If you mean “OpenAI API compatibility for fine-tuning GPT-4o-mini (gpt-4o-mini-2024-07-18)”, that is documented by OpenAI and Azure OpenAI, but not by Tuning Engines in the sources I found. [3][4][6] - If you mean “Tuning Engines’ own supported base models” and “whether it supports OpenAI-compatible base_url /v1”, I need you to point me to Tuning Engines’ API/MCP docs (or tell me the exact endpoint/product name). Right now, the available sources don’t include that level of detail. [1][2] If you share a link to Tuning Engines’ API reference (or tell me what endpoint they provide), I can re-run the research specifically to extract: - supported base model IDs (including whether gpt-4o-mini-2024-07-18 is supported) - the exact OpenAI-compatible base_url (e.g., ending in /v1) and the fine-tuning route naming (/fine_tuning/jobs vs something else).

Citations:


🌐 Web query:

site:tuningengines.com "gpt-4o-mini" "model"

💡 Result:

I’m not able to produce a source-grounded answer for “gpt-4o-mini” (e.g., its official model documentation, release details, or API model name) from the evidence available in the searches I ran: the only result returned was unrelated (a third-party site about fine-tuning open models) and the subsequent queries for authoritative OpenAI/platform documentation returned no results. If you want, share a link you’re expecting me to use (OpenAI model card / API docs / release notes), or allow me another research pass with more targeted queries (e.g., including “site:platform.openai.com gpt-4o-mini”, “site:help.openai.com gpt-4o-mini”, or “models list gpt-4o-mini”).

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

BASE="https://api.tuningengines.com/v1"

echo "## GET /v1/models (no auth)"
curl -sS -o /dev/null -w "HTTP_CODE=%{http_code}\n" -X GET "$BASE/models" || echo "curl_failed"

echo "## POST /v1/chat/completions (no auth, minimal body)"
curl -sS -o /dev/null -w "HTTP_CODE=%{http_code}\n" \
  -X POST "$BASE/chat/completions" \
  -H "Content-Type: application/json" \
  --data '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"hi"}]}' || echo "curl_failed"

echo "## POST /v1/responses (no auth, minimal body)"
curl -sS -o /dev/null -w "HTTP_CODE=%{http_code}\n" \
  -X POST "$BASE/responses" \
  -H "Content-Type: application/json" \
  --data '{"model":"gpt-4o-mini","input":"hi"}' || echo "curl_failed"

Repository: crewAIInc/crewAI

Length of output: 229


🌐 Web query:

site:tuningengines.com openai-compatible chat/completions responses base_url v1

💡 Result:

The standard endpoint for OpenAI-compatible chat completions is /v1/chat/completions [1]. When building or integrating with systems that offer OpenAI-compatible APIs, the base_url generally refers to the root path of the service provider's API server, often ending before the /v1 versioning prefix [2][1]. To interact with these services using standard OpenAI client SDKs (such as the official OpenAI Python library), you typically configure the client by providing the specific host URL as the base_url (or base_url parameter in newer SDK versions) [1]. For example, if an API provider hosts their service at api.example.com, the full request path for the completions endpoint is constructed as: https://api.example.com/v1/chat/completions When initializing an OpenAI-compatible client, you would set the base_url to: https://api.example.com/v1 This allows the client to correctly append the /chat/completions path for requests [1]. Always verify the specific base URL requirements in the documentation of the platform you are integrating with, as some may expect the base_url to terminate at the root domain while others may include the /v1 prefix [1].

Citations:


🌐 Web query:

site:github.com tuning-engines openai-compatible base_url /v1 responses

💡 Result:

Tuning Engines is a platform that provides specialized fine-tuning services for various open-source LLMs (such as Llama, Qwen, DeepSeek, Mistral, and others) [1]. To integrate Tuning Engines into applications or AI assistants that expect an OpenAI-compatible API, users configure the base URL to point to the Tuning Engines API endpoint and use a specific API key format [2]. For OpenAI-compatible integrations, the standard base URL is: https://api.tuningengines.com/v1 [2] Users typically authenticate with an API key formatted as sk-te-... [2]. Many AI development tools and agent frameworks (such as Continue or Cline) support this by allowing users to set a custom base URL and API key [3][4][2][5]. When configured this way, the application routes its requests—such as chat completions or model interactions—to the Tuning Engines infrastructure instead of the default OpenAI servers [6]. Tuning Engines provides a CLI and MCP (Model Context Protocol) server to manage fine-tuning jobs, track model status, and handle GPU orchestration [1]. The platform defaults to https://app.tuningengines.com for general API operations [1], while the /v1 path is specifically used for OpenAI-compatible model inference and completion endpoints [2].

Citations:


🌐 Web query:

site:tuningengines.com "gpt-4o-mini"

💡 Result:

As of May 30, 2026, there is no widely recognized or official information available regarding a model specifically designated as "gpt-4o-mini" from OpenAI. Current OpenAI model offerings include the GPT-4o series, but the specific "mini" designation does not appear in current authoritative documentation or broad public records [1][2]. The term may be a misunderstanding or a reference to a model that has not been officially released or documented by OpenAI as of this date.

Citations:


🌐 Web query:

site:github.com tuning-engines-cli "gpt-4o-mini"

💡 Result:

The query “tuning-engines-cli "gpt-4o-mini"” appears to refer to the GitHub project cerebrixos-org/tuning-engines-cli, which is described as a “CLI & MCP server for Tuning Engines” that can fine-tune open LLMs on code repositories via a CLI or an MCP-compatible AI assistant. [1] However, the available sources I found do not explicitly show that this specific CLI accepts or supports the OpenAI model ID “gpt-4o-mini” as a tuning target. In other words: I can confirm what the tuning-engines-cli project is and that it supports fine-tuning open models (e.g., Llama/Qwen/etc.), but I cannot confirm from cited sources that you can fine-tune “gpt-4o-mini” specifically with it. [1] What I can support with evidence from the tuning-engines-cli repository: 1) Purpose: It’s a CLI/MCP server for “Tuning Engines” to tailor/fine-tune open models on user data/repositories. [1] 2) Training options/features at a high level: it mentions support for LoRA/QLoRA/full fine-tuning and managed GPU provisioning/training orchestration. [1] 3) Job-related MCP/CLI tool surface: it lists operations like create_job, estimate_job, list_jobs, show_job, cancel_job, retry_job, and model import/export/status functions. [1] There is another unrelated project in results that mentions “gpt-4o-mini” (wkdkavishka/GPT-shell-4o-mini), but that is a terminal client for using OpenAI models (not “tuning-engines-cli” nor tuning/fine-tuning). [2] If you want, paste the exact command you’re trying to run (or the CLI help output), and I can determine whether “gpt-4o-mini” is meant to be a supported model parameter for tuning-engines-cli, or whether you should instead use one of the open-model families it supports (as suggested by the repository description).

Citations:


🌐 Web query:

site:tuningengines.com supported models llama qwen deepseek mistral model id

💡 Result:

On tuningengines.com, the publicly listed “Model library” includes these supported open-model families/variants: Llama (3.3 70B, 3.1 8B, 3.2 Vision), DeepSeek (V3, R1), Qwen (2.5 72B, 2.5 Coder 32B), and Mistral (Mistral Small 3, Mixtral 8x7B). [1]

The site does not publish the exact API model ID strings for those entries (it only shows an example call using model="gpt-4o-mini" and notes an OpenAI-compatible base URL). To get the exact IDs, you’d typically need to query the provider’s models list from their API/dashboard. [1]


Update the Tuning Engines example to ensure model is actually supported

  • In docs/en/learn/llm-connections.mdx (lines 159-168), base_url="https://api.tuningengines.com/v1" is consistent with an OpenAI-compatible gateway: unauthenticated requests to /models, /chat/completions, and /responses return 401 (not 404).
  • model="gpt-4o-mini" still isn’t supported by a clearly published “supported model IDs” list in the sources found; align the snippet with Tuning Engines’ real model IDs (or cite their exact model/source) to avoid readers copying a non-working model value.
  • The comment wording is more promotional than the neighboring examples; make the description more neutral/instructional.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/en/learn/llm-connections.mdx` around lines 159 - 168, Update the Tuning
Engines example in the LLM snippet to use an actual supported model ID and
neutral wording: replace model="gpt-4o-mini" with a verified Tuning Engines
model ID (or cite the exact model/source in a short parenthetical), keep the
LLM(...) and Agent(...) usage but ensure
base_url="https://api.tuningengines.com/v1" remains consistent with an
OpenAI-compatible gateway, and change the leading comment to a neutral
instructional sentence (e.g., "Example showing how to configure an
OpenAI-compatible gateway for model routing and policy controls") instead of
promotional language; ensure references to the LLM class, model parameter,
base_url, and Agent class are updated accordingly.

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.

2 participants