Skip to content

Add repository CWD to Rust model listing - #2297

Open
eljog wants to merge 3 commits into
mainfrom
eljog-add-model-list-cwd
Open

Add repository CWD to Rust model listing#2297
eljog wants to merge 3 commits into
mainfrom
eljog-add-model-list-cwd

Conversation

@eljog

@eljog eljog commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

  • add optional cwd to Rust ModelsListRequest so callers can resolve repository-scoped model availability before a session exists
  • preserve account-global behavior when cwd is omitted
  • augment the pinned runtime schema during Rust codegen until the upstream contract includes the field, while deferring to the schema once it does
  • cover generated serialization, default omission, and typed models.list RPC framing

Validation

  • cargo +nightly-2026-04-14 fmt --check
  • cargo clippy --all-features --all-targets -- -D warnings
  • cargo test --all-features --test api_types_test --test session_test models_list
  • deterministic Rust codegen regeneration check

Eljo George and others added 3 commits August 7, 2026 13:39
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove the unconfirmed skipCache option and keep cwd-only repository scoping.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@eljog
eljog requested a review from a team as a code owner August 7, 2026 21:18
Copilot AI balanced review requested due to automatic review settings August 7, 2026 21:18

Copilot AI 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.

Pull request overview

Adds repository-scoped model availability to the Rust SDK.

Changes:

  • Augments Rust codegen with optional cwd.
  • Regenerates ModelsListRequest.
  • Tests serialization and RPC framing.
Show a summary per file
File Description
scripts/codegen/utils.ts Adds schema augmentation for cwd.
scripts/codegen/rust.ts Applies augmentation during Rust generation.
rust/src/generated/api_types.rs Adds generated cwd field.
rust/tests/api_types_test.rs Tests serialization and omission.
rust/tests/session_test.rs Tests models.list RPC framing.

Review details

  • Files reviewed: 4/5 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread scripts/codegen/utils.ts
Comment on lines +528 to +529
requestDefinition.description =
"Optional GitHub token and working directory used to resolve available models.";
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.

2 participants