Skip to content

Standardize file paths for custom model routers.#13078

Merged
szgupta merged 2 commits into
masterfrom
suraj/standardize-file-path
Jun 26, 2026
Merged

Standardize file paths for custom model routers.#13078
szgupta merged 2 commits into
masterfrom
suraj/standardize-file-path

Conversation

@szgupta

@szgupta szgupta commented Jun 26, 2026

Copy link
Copy Markdown
Member

No description provided.

@szgupta szgupta requested a review from danielpeng2 June 26, 2026 06:17
@cla-bot cla-bot Bot added the cla-signed label Jun 26, 2026
@szgupta szgupta enabled auto-merge (squash) June 26, 2026 06:17
@oz-for-oss

oz-for-oss Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@szgupta

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overview

This PR changes new custom model router saves to derive lowercased, sanitized YAML filenames from router names.

Concerns

  • Distinct router names can now normalize to the same filename, and the save path still overwrites without checking for an existing file.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/user_config/native.rs Outdated
let sanitized = name
.to_lowercase()
.replace(|c: char| !c.is_alphanumeric() && c != '-', "_");
dir.join(format!("{sanitized}.yaml"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] Distinct names can now collapse to the same path (for example Foo Bar and foo_bar both become foo_bar.yaml), and the later std::fs::write will silently overwrite the existing router file; reject or disambiguate existing paths before writing.

@szgupta szgupta requested a review from coolcom200 June 26, 2026 06:30
@szgupta szgupta merged commit f554cf7 into master Jun 26, 2026
27 checks passed
@szgupta szgupta deleted the suraj/standardize-file-path branch June 26, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants