Skip to content

Document Tuning Engines OpenAI-compatible configuration#5981

Open
cerebrixos wants to merge 2 commits into
crewAIInc:mainfrom
cerebrixos:tuning-engines-openai-compatible-docs
Open

Document Tuning Engines OpenAI-compatible configuration#5981
cerebrixos wants to merge 2 commits 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

Summary by CodeRabbit

  • Documentation
    • Expanded the "Using LLM Class Attributes" section with a new code example showing how to configure an LLM instance for Tuning Engines OpenAI-compatible endpoints. The example demonstrates configuration with model, API key, and base URL settings, and illustrates integration with an Agent.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 250e10d4-089f-434f-a048-9162b94289db

📥 Commits

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

📒 Files selected for processing (1)
  • docs/en/learn/llm-connections.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/en/learn/llm-connections.mdx

📝 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding documentation for Tuning Engines OpenAI-compatible configuration, which aligns directly with the PR's objective of documenting how to use the existing OpenAI-compatible configuration with Tuning Engines.
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.

✏️ 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 thread docs/en/learn/llm-connections.mdx
@cerebrixos cerebrixos force-pushed the tuning-engines-openai-compatible-docs branch from 9c11603 to 5dabd84 Compare June 4, 2026 13:57
@cerebrixos
Copy link
Copy Markdown
Author

Thanks for the review. I pushed an update that addresses the wording/model note:

  • changed the comment to a neutral Example using Tuning Engines OpenAI-compatible endpoint
  • replaced the hardcoded gpt-4o-mini with your-model-alias and a note to use a model alias from the Tuning Engines catalog
  • rebased the branch onto current main

Validation: git diff --check origin/main...HEAD passes.

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