Skip to content

fix(router): import Bytes for the stream-relay channel type - #2141

Merged
slin1237 merged 1 commit into
mainfrom
fix/relay-channel-lint
Aug 13, 2026
Merged

slin1237 merged 1 commit into
mainfrom
fix/relay-channel-lint

Conversation

@slin1237

Copy link
Copy Markdown
Member

Motivation

main's lint lane is currently red: the stream-relay channel in send_typed_request (model_gateway/src/routers/http/router.rs) names bytes::Bytes by full path, which trips the workspace-wide unused_qualifications lint. Every open PR now fails the lint job through no fault of its own.

Modifications

  • Import bytes::Bytes in model_gateway/src/routers/http/router.rs and drop the path qualification on the relay channel's type parameter.

Test Plan

  • cargo +nightly fmt --all — clean
  • cargo clippy -p smg --lib -- -D warnings — clean (previously failed with unnecessary qualification)
  • cargo clippy -p smg --all-targets -- -D warnings — clean

One-line type-path change; no behavior difference.

Related Issues

Unblocks the lint lane for all open PRs (first observed on #2138's run).

The relay channel in send_typed_request names bytes::Bytes by full
path, tripping the workspace unused_qualifications lint and failing
the lint lane on every PR. Import the type and drop the qualification.

Signed-off-by: Simo Lin <25425177+slin1237@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

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: c11244b0-f096-4dbf-814f-47203163c8ff

📥 Commits

Reviewing files that changed from the base of the PR and between c9113ac and abe4b86.

📒 Files selected for processing (1)
  • model_gateway/src/routers/http/router.rs

📝 Walkthrough

Summary by CodeRabbit

  • Refactor
    • Simplified internal type references for the streaming transcription relay.
    • No user-visible behavior changes.

Walkthrough

The HTTP router now imports bytes::Bytes directly and uses the imported type for the streaming multipart transcription relay channel. Runtime behavior remains unchanged.

Changes

Router type cleanup

Layer / File(s) Summary
Stream relay type import
model_gateway/src/routers/http/router.rs
The router imports Bytes and uses it for the stream relay channel payload type.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Mergeability Score: ⚪ Minimal · up to abe4b

This is a localized lint-only cleanup that preserves the existing stream-relay type and runtime behavior; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: catherinesue, key4ng

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the import and type qualification change that fixes the router lint issue.
Description check ✅ Passed The description directly explains the lint failure, code modification, validation steps, and unchanged behavior.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/relay-channel-lint

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the model-gateway Model gateway crate changes label Aug 13, 2026
@slin1237
slin1237 merged commit 43f35cb into main Aug 13, 2026
8 of 14 checks passed
@slin1237
slin1237 deleted the fix/relay-channel-lint branch August 13, 2026 15:07
@claude

claude Bot commented Aug 13, 2026

Copy link
Copy Markdown

👋 The PR description doesn't fully follow
PULL_REQUEST_TEMPLATE.md:

  • Missing header: ## Description
  • Missing header: ### Problem
  • Missing header: ### Solution
  • Missing header: ## Changes

Please update the PR description so reviewers have the context they need.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Straightforward lint fix — imports bytes::Bytes and drops the unnecessary path qualification. No behavior change. LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model-gateway Model gateway crate changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant