NVIDIA-NeMo / NVIDIA-NeMo/Switchyard

[feature] Support native Gemini generateContent translation

Open
#642 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
3.2k
Forks
291
Avg merge
1d 8h
Merged PRs (30d)
182

Description

Problem

Switchyard supports OpenAI Chat, OpenAI Responses, and Anthropic Messages wire formats, but it cannot decode or encode native Gemini generateContent payloads. A caller or backend using the Gemini API must use an OpenAI-compatible adapter instead of routing the native request through Switchyard.

Proposed solution

Add native Gemini generateContent request and response support to switchyard-translation, including focused round-trip and cross-format tests.

Alternatives considered

Use a Gemini OpenAI-compatible endpoint. This works for some deployments, but does not preserve the native Gemini interface.

Scope notes

Keep this issue focused on the protocol and translation codec. Server endpoints, TOML configuration, streaming, and NeMo Relay plugin wiring can be evaluated separately.

Additional context

NeMo Relay added a Gemini generateContent codec in NVIDIA/NeMo-Relay#723. Relay and Switchyard have different codec boundaries, so that implementation is useful prior art rather than code Switchyard can enable directly.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the switchyard-translation crate by reading the existing OpenAI Chat, OpenAI Responses, and Anthropic Messages codecs. Add native Gemini generateContent request and response translation, then use focused round-trip and cross-format tests to verify the codec; server endpoints, TOML configuration, streaming, and NeMo Relay wiring are out of scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.