Skip to content

feat: validate GitHub Copilot model availability - #763

Open
jyje wants to merge 1 commit into
langchain-ai:mainfrom
jyje:feat/copilot-model-entitlement-validation
Open

feat: validate GitHub Copilot model availability#763
jyje wants to merge 1 commit into
langchain-ai:mainfrom
jyje:feat/copilot-model-entitlement-validation

Conversation

@jyje

@jyje jyje commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Validate the selected model against the GitHub Copilot Models API (/models) before inference starts, reusing the available / unavailable / unknown contract introduced by feat: validate openai model availability #491.
  • Treat a model as unavailable when it is missing from the catalogue, is not a chat model, or its policy state is explicitly disabled. Treat it as available when the policy state is enabled, or when there is no explicit policy and model_picker_enabled is true.
  • Stay non-blocking (unknown) when there is no API key, the lookup fails, the response shape is unexpected, or the API returns no eligibility signal at all.
  • Add unit coverage for available, unavailable (missing model, non-chat model, disabled policy), and the various fallback paths.

Validation

  • pnpm typecheck
  • pnpm run build
  • pnpm exec vitest run test/model-availability.test.ts test/config/copilot-provider.test.ts — 19 passed
  • pnpm run lint:check

Related issue

Third provider for #490's entitlement-validation effort, after OpenAI (#491, merged) and NVIDIA NIM (#492, in review). Reuses the same result contract so no shared code needed to change.

@changeset-bot

changeset-bot Bot commented Aug 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f755b87

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openwiki Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

1 participant