Skip to content

docs(observability): add Dynamic Model Router integration page#5803

Open
manthan9891994 wants to merge 3 commits into
crewAIInc:mainfrom
manthan9891994:docs/add-dynamic-model-router
Open

docs(observability): add Dynamic Model Router integration page#5803
manthan9891994 wants to merge 3 commits into
crewAIInc:mainfrom
manthan9891994:docs/add-dynamic-model-router

Conversation

@manthan9891994
Copy link
Copy Markdown

@manthan9891994 manthan9891994 commented May 14, 2026

Adds a docs page under Observability for dynamic-model-router, a pre-call task classifier that picks the cheapest model tier (low/medium/high) for each CrewAI agent call before any API request is made. Sits as a peer to portkey.mdx in the cost-optimization / routing category, but runs in-process with no proxy.

Drop-in DynamicLLM replacement, 3-layer cascade (keywords -> frozen MiniLM -> LLM fallback), classifies in <15ms. Doc page is explicit that savings depend on the user's traffic mix and how they tune the cascade for their domain.

Files:

  • docs/en/observability/dynamic-model-router.mdx (new page, follows portkey.mdx template)
  • docs/pt-BR/observability/dynamic-model-router.mdx (translation parity)
  • docs/ko/observability/dynamic-model-router.mdx (translation parity)
  • docs/ar/observability/dynamic-model-router.mdx (translation parity)
  • docs/docs.json (nav entries under Observability for all 4 locales)

PyPI: https://pypi.org/project/dynamic-model-router/
Repo: https://github.com/manthan9891994/agents-multi-model-support

Summary by CodeRabbit

  • Documentation
    • Added documentation for Dynamic Model Router integration with CrewAI, covering pre-call routing behavior with keyword matching and LLM fallback cascades. Includes setup examples, telemetry features, and optional decision persistence configuration.

Review Change Stack

Adds a docs page under Observability for dynamic-model-router, a pre-call
task classifier that picks the cheapest model tier (low/medium/high) for
each CrewAI agent call before any API request is made. Sits as a peer to
portkey.mdx in the cost-optimization / routing category, but runs
in-process with no proxy.

Drop-in DynamicLLM replacement, 3-layer cascade (keywords -> frozen
MiniLM -> LLM fallback), classifies in <15ms. Doc page is explicit that
savings depend on the user's traffic mix and how they tune the cascade
for their domain.

Files:
- docs/en/observability/dynamic-model-router.mdx (new page, follows portkey.mdx template)
- docs/pt-BR/observability/dynamic-model-router.mdx (translation parity)
- docs/ko/observability/dynamic-model-router.mdx (translation parity)
- docs/ar/observability/dynamic-model-router.mdx (translation parity)
- docs/docs.json (nav entries under Observability for all 4 locales)

PyPI: https://pypi.org/project/dynamic-model-router/
Repo: https://github.com/manthan9891994/agents-multi-model-support
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

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: 76877c8f-8788-4a04-b265-dee2178ac616

📥 Commits

Reviewing files that changed from the base of the PR and between dbc1bd6 and fab2314.

📒 Files selected for processing (1)
  • docs/docs.json

📝 Walkthrough

Walkthrough

This PR adds a new English observability documentation page describing how to integrate the Dynamic Model Router with CrewAI, explaining its pre-call routing cascade behavior and telemetry features. The page is then registered across multiple navigation sections in the docs.json manifest.

Changes

Dynamic Model Router Documentation (English)

Layer / File(s) Summary
English documentation: Dynamic Model Router integration guide
docs/en/observability/dynamic-model-router.mdx
MDX page with frontmatter, pre-call routing cascade explanation, installation instructions, CrewAI wiring using DynamicLLM, optional telemetry and Router persistence configuration examples, rationale, and resource links.
Documentation manifest registration (English)
docs/docs.json
The docs.json manifest inserts the en/observability/dynamic-model-router route across thirteen navigation lists after the existing Portkey entry, exposing the new page in multiple navigation sections.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A router so dynamic, it leaps with finesse,
Guiding small models through decision's caress,
No proxy delays, just telemetry's grace,
Docs now unfold at their proper place! 📚✨

🚥 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 PR title clearly and concisely summarizes the main change: adding documentation for Dynamic Model Router integration under the Observability section.
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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
docs/en/observability/dynamic-model-router.mdx (1)

93-98: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add missing newline at end of file.

The file should end with a newline character for POSIX compliance and to avoid issues with some tools.

📝 Proposed fix
 - **License**: MIT
+
🤖 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/observability/dynamic-model-router.mdx` around lines 93 - 98, The
file ends without a trailing newline; update the document (the Resources section
in dynamic-model-router.mdx) to ensure the file terminates with a single newline
character (POSIX-compliant EOF newline) by adding a newline at the very end of
the file so tools and linters recognize the final line break.
docs/pt-BR/observability/dynamic-model-router.mdx (1)

1-98: ⚠️ Potential issue | 🔴 Critical | 🏗️ Heavy lift

The pt-BR file contains untranslated English content.

This file is in the docs/pt-BR/ directory but contains English text throughout. The title, description, introduction, explanations, and all prose should be translated to Portuguese (Brazil). Only code examples and technical terms like API names should remain in English.

This affects the entire documentation experience for Portuguese-speaking users.

🤖 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/pt-BR/observability/dynamic-model-router.mdx` around lines 1 - 98,
Translate all English prose in this file into Brazilian Portuguese: the
frontmatter title and description, headings (Introduction, Why it helps,
Resources), all paragraph text, bullet points, Step titles and explanatory text
inside the Steps block, and the explanatory sentences around code examples;
leave code blocks, inline code identifiers and technical/API names unchanged
(e.g., DynamicLLM, Router, StdoutLoggerBackend, Crew, Agent, Task,
crew.kickoff(), PyPI/GitHub links, package names) and keep URLs intact; ensure
the translated text preserves meaning and tone for documentation readers and
that examples, punctuation and markup (Steps/Step tags, backticks) remain
unchanged.
docs/ko/observability/dynamic-model-router.mdx (1)

1-98: ⚠️ Potential issue | 🔴 Critical | 🏗️ Heavy lift

The ko file contains untranslated English content.

This file is in the docs/ko/ directory but contains English text throughout. The entire documentation should be translated to Korean, with only code examples and technical API names remaining in English.

This affects the entire documentation experience for Korean-speaking users.

🤖 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/ko/observability/dynamic-model-router.mdx` around lines 1 - 98, The
Korean doc file currently contains English content; translate all visible
English text into Korean (frontmatter title/description, headings, paragraphs,
bullet lists, and Step titles/descriptions) while leaving code blocks and
technical API/class names unchanged — preserve identifiers like Dynamic Model
Router, DynamicLLM, Router, StdoutLoggerBackend, Crew, Agent, Task, and any code
samples exactly as-is; ensure the translated Korean copy maintains the original
meaning and structure (Introduction, Installation & Setup, Why it helps,
Resources) and that links, code fences, and examples remain intact and
unmodified.
docs/ar/observability/dynamic-model-router.mdx (1)

1-98: ⚠️ Potential issue | 🔴 Critical | 🏗️ Heavy lift

The ar file contains untranslated English content.

This file is in the docs/ar/ directory but contains English text throughout. The entire documentation should be translated to Arabic, with only code examples and technical API names remaining in English. Additionally, Arabic is a right-to-left (RTL) language, which may require special formatting considerations for the MDX layout.

This affects the entire documentation experience for Arabic-speaking users.

🤖 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/ar/observability/dynamic-model-router.mdx` around lines 1 - 98, The
Arabic documentation page titled "Dynamic Model Router Integration" contains
English content; translate the entire prose into Arabic while leaving code
blocks and technical identifiers (e.g., DynamicLLM, Router, StdoutLoggerBackend,
Crew, Agent, Task, kickoff) in English, and ensure MDX structure elements like
Steps/Step titles are localized; also adjust the page for RTL rendering (flip
layout-sensitive text, set dir="rtl" or use appropriate MDX RTL wrapper) so
Arabic reads correctly without altering code examples or API names.
🤖 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/observability/dynamic-model-router.mdx`:
- Around line 79-80: The example instantiates Router and DynamicLLM separately
but never wires them together; update the example to pass the Router into the
DynamicLLM (e.g., create router = Router(decision_logger=StdoutLoggerBackend())
and then construct the LLM with that router by calling DynamicLLM(router=router)
or assign llm.router = router after construction) so readers see the complete
wiring between Router, StdoutLoggerBackend, and DynamicLLM.

---

Outside diff comments:
In `@docs/ar/observability/dynamic-model-router.mdx`:
- Around line 1-98: The Arabic documentation page titled "Dynamic Model Router
Integration" contains English content; translate the entire prose into Arabic
while leaving code blocks and technical identifiers (e.g., DynamicLLM, Router,
StdoutLoggerBackend, Crew, Agent, Task, kickoff) in English, and ensure MDX
structure elements like Steps/Step titles are localized; also adjust the page
for RTL rendering (flip layout-sensitive text, set dir="rtl" or use appropriate
MDX RTL wrapper) so Arabic reads correctly without altering code examples or API
names.

In `@docs/en/observability/dynamic-model-router.mdx`:
- Around line 93-98: The file ends without a trailing newline; update the
document (the Resources section in dynamic-model-router.mdx) to ensure the file
terminates with a single newline character (POSIX-compliant EOF newline) by
adding a newline at the very end of the file so tools and linters recognize the
final line break.

In `@docs/ko/observability/dynamic-model-router.mdx`:
- Around line 1-98: The Korean doc file currently contains English content;
translate all visible English text into Korean (frontmatter title/description,
headings, paragraphs, bullet lists, and Step titles/descriptions) while leaving
code blocks and technical API/class names unchanged — preserve identifiers like
Dynamic Model Router, DynamicLLM, Router, StdoutLoggerBackend, Crew, Agent,
Task, and any code samples exactly as-is; ensure the translated Korean copy
maintains the original meaning and structure (Introduction, Installation &
Setup, Why it helps, Resources) and that links, code fences, and examples remain
intact and unmodified.

In `@docs/pt-BR/observability/dynamic-model-router.mdx`:
- Around line 1-98: Translate all English prose in this file into Brazilian
Portuguese: the frontmatter title and description, headings (Introduction, Why
it helps, Resources), all paragraph text, bullet points, Step titles and
explanatory text inside the Steps block, and the explanatory sentences around
code examples; leave code blocks, inline code identifiers and technical/API
names unchanged (e.g., DynamicLLM, Router, StdoutLoggerBackend, Crew, Agent,
Task, crew.kickoff(), PyPI/GitHub links, package names) and keep URLs intact;
ensure the translated text preserves meaning and tone for documentation readers
and that examples, punctuation and markup (Steps/Step tags, backticks) remain
unchanged.
🪄 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: 99bff061-17ff-4d2c-a310-9c47e2d7c08e

📥 Commits

Reviewing files that changed from the base of the PR and between c36827b and 4ae4e57.

📒 Files selected for processing (5)
  • docs/ar/observability/dynamic-model-router.mdx
  • docs/docs.json
  • docs/en/observability/dynamic-model-router.mdx
  • docs/ko/observability/dynamic-model-router.mdx
  • docs/pt-BR/observability/dynamic-model-router.mdx

Comment thread docs/en/observability/dynamic-model-router.mdx Outdated
Address coderabbit feedback: the prior 'Optional telemetry' example
instantiated Router and DynamicLLM separately without wiring them
together, which was misleading. Replaced with two accurate options:
DMR_TELEMETRY env-var path (no code changes) and direct Router.classify
path for persistent backends.
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: 4

🤖 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/ar/observability/dynamic-model-router.mdx`:
- Around line 2-115: The page under the Arabic locale is entirely in English;
translate the whole document (frontmatter title/description, all headings,
prose, step titles and code comments) into Arabic while preserving identifiers
and API names (e.g., Dynamic Model Router, DynamicLLM, Router, DMR_TELEMETRY,
StdoutLoggerBackend) and keeping code blocks unchanged; ensure translated step
titles within the <Steps>/<Step> sections, the introduction, "Why it helps",
"Resources" and frontmatter (title/description) are fully localized to Arabic
and that links and examples remain intact.

In `@docs/en/observability/dynamic-model-router.mdx`:
- Line 12: The cascade layer labels are inconsistent: update the text "L1
keywords (<1ms) → L3 frozen MiniLM ML head (~15ms) → L2 LLM fallback (~500ms)"
so the labels follow the documented sequence (keyword → MiniLM → LLM fallback);
e.g., change to "L1 keywords (<1ms) → L2 frozen MiniLM ML head (~15ms) → L3 LLM
fallback (~500ms)" to make the layer numbering consistent.

In `@docs/ko/observability/dynamic-model-router.mdx`:
- Around line 2-115: The page is in English but must be fully localized to
Korean: translate the frontmatter fields (title, description, icon labels if
user-facing) and every user-facing string in the body — headings
("Introduction", "Installation & Setup", "Why it helps", "Resources"), bullet
texts, step titles ("Install the required packages", "Configure CrewAI with the
Dynamic Model Router", "Optional — enable telemetry"), code comments/strings
shown to users (e.g., example output, log instructions mentioning
DMR_TELEMETRY), and link labels so the entire document under the ko locale is
Korean while keeping identifiers like DynamicLLM, Router, StdoutLoggerBackend,
DMR_TELEMETRY, PyPI/GitHub links unchanged.

In `@docs/pt-BR/observability/dynamic-model-router.mdx`:
- Around line 2-115: Translate all English copy between lines 2–115 into
Brazilian Portuguese while preserving the file frontmatter, headings,
formatting, code blocks and inline links; keep identifiers and symbols unchanged
(e.g., "Dynamic Model Router", "DynamicLLM", "DMR_TELEMETRY", "Router",
"StdoutLoggerBackend") and only localize the human-readable text, descriptions,
step titles, bullet points and explanatory paragraphs so the pt-BR doc reads
naturally for Portuguese-speaking users.
🪄 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: ffb34b83-3f89-4382-802e-5b31f4ca6897

📥 Commits

Reviewing files that changed from the base of the PR and between 4ae4e57 and dbc1bd6.

📒 Files selected for processing (4)
  • docs/ar/observability/dynamic-model-router.mdx
  • docs/en/observability/dynamic-model-router.mdx
  • docs/ko/observability/dynamic-model-router.mdx
  • docs/pt-BR/observability/dynamic-model-router.mdx

Comment thread docs/ar/observability/dynamic-model-router.mdx Outdated
Comment thread docs/en/observability/dynamic-model-router.mdx
Comment thread docs/ko/observability/dynamic-model-router.mdx Outdated
Comment thread docs/pt-BR/observability/dynamic-model-router.mdx Outdated
Per coderabbit feedback: shipping English content under ko/ar/pt-BR
locale routes is misleading. Removing the placeholder copies and their
nav entries so the English page is the single source of truth.
Translation parity will follow as separate PRs by native speakers.
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.

1 participant