Skip to content

docs(sdk): add Route Task to Model guide - #824

Open
juanmichelini wants to merge 2 commits into
mainfrom
route-task-to-model-example
Open

juanmichelini wants to merge 2 commits into
mainfrom
route-task-to-model-example

Conversation

@juanmichelini

Copy link
Copy Markdown
Contributor

Summary

Adds a new SDK guide, Route Task to Model, documenting the route_task_to_model tool (ClassifyAndSwitchLLMTool) introduced in software-agent-sdk PR OpenHands/software-agent-sdk#4287.

The guide covers both meta-profile shapes the tool supports:

  • Structured classes — {description, model} rows; classifier returns a class index.
  • Direct prompt — prompt_template + model_table; classifier returns the model name as JSON.

It references the new ready-to-run example examples/01_standalone_sdk/59_route_task_to_model.py and is registered in the "LLM Features" group in docs.json (after "Model Routing").

This unblocks the check-examples CI check on the agent-sdk PR (the check requires each example to be referenced from a docs .mdx file).

AI disclosure: This PR was created by an AI agent (OpenHands) on behalf of @juanmichelini.

Checklist

  • New .mdx guide added under sdk/guides/
  • Registered in docs.json
  • Example code block auto-syncs from the agent-sdk repo
  • Follows the format of existing guides (e.g., llm-routing.mdx)

Document the route_task_to_model tool (ClassifyAndSwitchLLMTool) and its
meta-profile shapes (structured classes + direct prompt), referencing the new
examples/01_standalone_sdk/59_route_task_to_model.py in software-agent-sdk PR
#4287.

Co-authored-by: openhands <openhands@all-hands.dev>
@mintlify

mintlify Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
all-hands-ai 🟢 Ready View Preview Sep 30, 2026, 9:03 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@juanmichelini

Copy link
Copy Markdown
Contributor Author

@OpenHands please look at https://github.com/OpenHands/openhands and notice that we are using names Router Pro and Router Flash instead of Pareto update docs accordingly

@openhands-ai

openhands-ai Bot commented Sep 30, 2026

Copy link
Copy Markdown

I'm on it! juanmichelini can track my progress at all-hands.dev

The OpenHands app brands the two built-in direct-prompt router meta-profiles
as OpenHands Router Pro and OpenHands Router Flash (renamed from the
max-score/min-cost Pareto templates in OpenHands#17782. Update the guide
prose and the synced example comment accordingly.

Co-authored-by: openhands <openhands@all-hands.dev>

Copy link
Copy Markdown
Contributor Author

Addressed in 9ec3c7c. Updated the guide to reference the OpenHands app's renamed built-in routers, OpenHands Router Pro and OpenHands Router Flash, instead of the old Pareto prompt meta-profile names — both in the prose and in the synced example comment.

(This PR was created by an AI agent (OpenHands) on behalf of @juanmichelini.)

@openhands-ai

openhands-ai Bot commented Sep 30, 2026

Copy link
Copy Markdown

Done. Here's a summary of what I did to address the review comment on PR #824:

What the comment asked

@juanmichelini pointed out that the OpenHands app now uses the names Router Pro and Router Flash (the two built-in router meta-profiles, formerly known as "max-score Pareto"/"min-cost Pareto" — renamed in OpenHands/OpenHands#17782) instead of "Pareto", and requested the docs be updated accordingly.

Changes made (sdk/guides/llm-route-task-to-model.mdx)

  1. Prose (Direct-prompt meta-profile section): replaced

    This is the shape used by the Pareto prompt meta-profiles.

    This is the shape used by the OpenHands Router Pro and Router Flash router meta-profiles.

  2. Synced example comment (inside the auto-synced 59_route_task_to_model.py block):

    # shape used by the Pareto prompt meta-profiles.

    → # shape used by the OpenHands Router Pro / Router Flash meta-profiles.

Verification

Note on the source example

The stale "Pareto" comment also still exists in the agent-sdk source (software-agent-sdk/examples/01_standalone_sdk/59_route_task_to_model.py:126). Since the docs code block auto-syncs daily from that repo's main, that source comment should be updated there too to prevent the sync workflow from reverting my inline edit. That's outside this docs PR's scope, but worth flagging if you want to open a small agent-sdk PR for it.

This branch was successfully deployed

1 active deployment
staging — 9ec3c7c4 Deployed Sep 30, 2026 by mintlify[bot]
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.

3 participants