[feature] Add Microsoft Foundry Rank as a direct-mode decision client
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 18/100
Direzione di ricerca
The payload names no files, so start from the existing llm_classifier route in direct mode and the current decision clients it calls, then compare how a choice is returned to the routing logic. The Foundry Rank client mirrors those, and the generation client and fallback rules stay unchanged. Done means the Rank choice maps to a configured target, and outcome reporting is a separate, later step, so the draft PR covers selection only.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem statement
Switchyard's direct mode can ask an external service to choose a model, then send the request to that model's deployment. Existing decision clients send a prepared conversation and a choice question. Microsoft Foundry Rank instead needs the original API request, including settings such as tools and structured output, plus the list of models it can choose from. It returns a recommendation, not a generated answer. There is no built-in way to use that API as a Switchyard decision client today.
Goal
Let operators use Foundry Rank to choose among the models they configure in Switchyard. Switchyard should still own routing and generation, and existing decision clients should keep their current behavior.
Proposed solution
Add a foundry_rank decision client for the existing llm_classifier route with mode = "direct". Apps keep calling the same Switchyard endpoints. The new decision client only handles the call to Foundry Rank; the existing generation client still calls the selected deployment.
flowchart LR
A[App]
subgraph SY[Switchyard]
subgraph DIRECT[Direct route]
B[Routing logic]
C[Foundry Rank decision client]
end
G[Existing generation client]
end
R[Microsoft Foundry Rank API]
D[Configured model deployment]
A -->|Original request| B
B -->|Request and configured choices| C
C -->|Original request and canonical model IDs| R
R -->|Recommended model ID and optional version| C
C -->|Switchyard choice| B
B -->|Request and mapped deployment| G
G -->|Generation request| D
D -->|Generated answer| G
G -->|Answer| A
The operator owns the mapping. Configure each choice group with the canonical model ID that Foundry Rank recognizes, and point that group to a Switchyard generation target. For example, the gpt-5-mini group could point to a target named mini, which calls a deployment named support-mini-prod. Rank sees gpt-5-mini, not either local alias. Switchyard checks the recommended version against the configured version when Rank returns one; the operator is responsible for keeping that mapping accurate.
Send the original request for compatibility checks. The client passes the incoming Chat Completions, Responses, or Anthropic Messages JSON, including instructions, tool definitions, and output settings. Rank picks one model from the configured pool, which can contain a single model if the operator only wants a compatibility check. Rank evaluates the incoming request; it cannot guarantee that generation will succeed after Switchyard translates the request or applies target overrides. The Rank call uses the configured Foundry endpoint and operator credentials, separate from the generation client.
Report the generation outcome back to Rank. Switchyard keeps the request ID returned by Rank and associates it with the generation attempt. After generation completes successfully, Switchyard reports the canonical ID of the model that actually served the request, even if a configured fallback served it. The report includes the Rank request ID and the successful attempt’s start time. It can also include token usage when available and the provider response ID when needed for Responses continuity. Switchyard uses the operator’s deployment mapping to translate the serving target back to a canonical ID.
The first version supports both ways to send feedback:
- With the next Rank request: Include
previous_outcomewhen there is another Rank request in the same API format. Rank can use the earlier result when deciding the next turn. - On its own: Send
operation: "report_outcome"withpayload_formatandprevious_outcome, but no generation payload or model pool. This covers cases like the last turn of a conversation, where there may be no next Rank request.
Feedback is best effort. A failed report should not turn a successful generation into an error for the app. A successful acknowledgment does not guarantee that Rank used the feedback. No new Switchyard endpoint or routing algorithm is proposed. The current draft PR covers model selection; outcome reporting is proposed here and is not implemented in the draft yet.
Feedback welcome
Does a decision client in direct mode make sense as the integration point? Are there any concerns about passing the original request to the adapter or using the existing fallback rules?
- Lingua principale
- Rust
- Stelle
- 3.7k
- Fork
- 386
- Merge medio
- 1g 16h
- PR unite (30g)
- 113
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA-NeMo/Switchyard
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
NVIDIA-NeMo/Switchyard#1407 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
NVIDIA-NeMo/Switchyard#1405 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 18/100
NVIDIA-NeMo/Switchyard#1383 ·
I maintainer di solito rispondono entro 1 giorno
-
[bug] Relay streaming intercept preserves buffered upstream stream flagForse già presa @deepujain l’ha presa 10 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
NVIDIA-NeMo/Switchyard#1367 ·
I maintainer di solito rispondono entro 1 giorno
-
[Enhancement]: llm_classifier capability mode: derive capability_boundary from primary_rule instead of rejecting the verdictForse già presa @fede-kamel l’ha presa 12 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
NVIDIA-NeMo/Switchyard#1334 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di NVIDIA-NeMo/Switchyard
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ardia-browser/ardia#5810 ·
I maintainer di solito rispondono entro 1 giorno
-
Settings closes without an error when the config file is read-onlyForse già presa @euvoor l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
martin-olivier/airgorah#273 ·
I maintainer di solito rispondono entro 14 giorni
-
area/tui platform/macos type/feature version/v2
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
anomalyco/opencode#67490 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
UIUX の修正Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno