Skip to content

Commit 51cae87

Browse files
committed
docs(spec): reconcile capabilities filter wording with implementation
ParseCopilotModels in GitHubCopilotDescriptor only removes entries whose capabilities.type is explicitly non-chat; entries that omit capabilities entirely pass through. The unit test (Probe_FiltersByCapabilityAndPickerEligibility, asserting `no-caps` is retained) documents this as intentional — Copilot's /models payload shape varies across model generations and we treat missing capabilities as 'unknown but selectable' rather than implicitly non-chat. Updates the SHALL clause and the matching scenario to describe the implemented behavior.
1 parent d760427 commit 51cae87

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

  • openspec/changes/add-github-copilot-provider/specs/netclaw-model-providers

openspec/changes/add-github-copilot-provider/specs/netclaw-model-providers/spec.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,13 @@ addition to the standard `Content-Type` and `Accept`:
2828
detail; the header MUST be present)
2929
- `openai-intent: conversation-agent`
3030

31-
Model discovery SHALL filter the `/models` response to entries where
32-
`capabilities.type == "chat"` and `model_picker_enabled != false`.
31+
Model discovery SHALL filter the `/models` response by removing entries
32+
whose `capabilities.type` is present and not equal to `"chat"`, and by
33+
removing entries where `model_picker_enabled` is explicitly `false`.
34+
Entries that omit `capabilities` entirely SHALL be retained — Copilot's
35+
`/models` payload includes shape variations across model generations,
36+
and a missing `capabilities` block is treated as "unknown but
37+
selectable" rather than implicitly non-chat.
3338

3439
#### Scenario: Operator selects GitHub Copilot in the wizard
3540

@@ -66,8 +71,10 @@ Model discovery SHALL filter the `/models` response to entries where
6671
- **WHEN** `ProviderProbe` runs against the entry
6772
- **THEN** the system fetches `GET https://api.githubcopilot.com/models`
6873
with the exchanged Copilot API token
69-
- **AND** the returned `DiscoveredModel` list includes only entries with
70-
`capabilities.type == "chat"` and `model_picker_enabled != false`
74+
- **AND** the returned `DiscoveredModel` list excludes entries whose
75+
`capabilities.type` is present and not `"chat"`, excludes entries with
76+
`model_picker_enabled == false`, and retains entries that omit
77+
`capabilities` entirely
7178

7279
#### Scenario: Copilot probe falls back to curated models when /models is unreachable
7380

0 commit comments

Comments
 (0)