Re-export ModelPolicyState and ModelPickerCategory from the crate root alongside Model/ModelPolicy
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
Research direction
Open types.rs and inspect the curated pub use crate::generated::api_types block that already exports Model and ModelPolicy. Add the two named enum exports there, then verify the crate-root imports compile and that ModelPolicyState and ModelPickerCategory are reachable alongside their container types.
Written by the indexing model from the issue text.
Description
Summary
The crate-root prelude (pub use types::*) surfaces a curated set of
generated protocol types, but omits two enums that are the field types
of structs already re-exported there. This makes the model-info surface
inconsistent: you can name the container struct at the crate root but
must reach through copilot::rpc for the enum that one of its fields
holds.
Details
types.rs curates the public re-export block:
/// Re-exports of generated protocol types that are part of the SDK's
/// public API surface. ...
pub use crate::generated::api_types::{
Model, ModelBilling, ModelCapabilities, ModelCapabilitiesLimits, ModelCapabilitiesLimitsVision,
ModelCapabilitiesSupports, ModelList, ModelPolicy, PermissionDecision,
PermissionDecisionApproveOnce, PermissionDecisionReject, PermissionDecisionUserNotAvailable,
};
Two enums are missing from that list even though they are the declared
field types of structs that are in it:
ModelPolicy.state: ModelPolicyState—ModelPolicyis re-exported;ModelPolicyStateis not.Model.model_picker_category: Option<ModelPickerCategory>—Modelis re-exported;ModelPickerCategoryis not.
Consequence
A consumer that pattern-matches on policy.state or reads
model.model_picker_category can refer to copilot::Model /
copilot::ModelPolicy from the crate root, but has to import the field
enums from a different path:
use copilot::{Model, ModelPolicy}; // crate root
use copilot::rpc::{ModelPolicyState, ModelPickerCategory}; // only here
Because the curated list looks complete, it's easy to assume the whole
model-info surface lives at the crate root and be surprised these two
don't. It's a small ergonomics/consistency papercut, not a correctness
issue (both are reachable via copilot::rpc).
Suggested fix
Add ModelPolicyState and ModelPickerCategory to the curated
pub use crate::generated::api_types::{ ... } block in types.rs, so
the full model-info type set is reachable from the crate root alongside
Model and ModelPolicy.
- Dominant language
- Java
- Stars
- 10.5k
- Forks
- 1.5k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 133
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/copilot-sdk
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/copilot-sdk#2709 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
github/copilot-sdk#2673 ·
-
bug testing
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
github/copilot-sdk#2628 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/copilot-sdk#2627 · 1 comment ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
github/copilot-sdk#2493 ·
All issues in github/copilot-sdk
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100