GitHub Adds Copilot Model Policy APIs

Daily Code Guide GitHub News

GitHub has made REST API operations for Copilot model policies generally available, giving enterprise administrators a way to retrieve and update model settings through scripts, administrative tooling, and potentially CI/CD workflows. The October 19, 2026 announcement covers enterprise, enterprise-team, enterprise-app, and organization scopes.

The change matters because model-policy administration no longer has to be handled entirely through manual settings changes. However, the API is governed by scope-specific permissions, editability rules, and organization eligibility requirements. The current documentation also differs from the announcement on the identifier used for enterprise teams, so implementations should account for that discrepancy.

What changed

GitHub’s announcement describes generally available GET and PATCH operations for Copilot model policies. The related REST references document policy management at four levels:

  • Enterprises
  • Enterprise teams
  • Enterprise apps
  • Organizations

At the organization level, administrators can retrieve and update effective Copilot model policies for models available to the organization. Organization updates are atomic: if one requested change cannot be applied, GitHub does not save any of the changes in that request.

The policy response can include effective states, enterprise policy states, defaults, and whether a model is editable. These values describe policy configuration, inheritance, and availability rules. They should not be treated as a complete determination of whether a particular individual user can access a model.

Ad

Scope and policy behavior

The available operations behave differently depending on where a policy is managed. Enterprise policies can include default availability and per-model policy objects, including delegation states where applicable. Enterprise apps support enabled, disabled, and optional states. For an app, optional removes the stored app policy for a model.

Enterprise teams also support enabled, disabled, and optional in PATCH requests. In this context, optional clears the team policy for a model. Only editable model policies can be changed; locked models cannot be updated.

Organization policy updates support explicit enabled and disabled states. Inherited enterprise policies and non-editable default availability cannot be changed through the organization endpoints. An organization must be independent or belong to an enterprise that is not using enterprise teams for model policy to use those documented organization operations.

That restriction is important for administrators designing automation. An organization governed through enterprise-team model policies cannot simply be managed through the organization endpoints instead. The policy hierarchy and the organization’s enterprise configuration determine which scope is appropriate.

Permissions and authentication

Enterprise operations use separate read and write permissions. Enterprise owners and users with read_enterprise_ai_controls can retrieve documented enterprise, enterprise-team, and enterprise-app policies. Updating those policies requires write_enterprise_ai_controls.

For enterprise-scope operations, OAuth app tokens and classic personal access tokens require read:enterprise for GET requests and admin:enterprise for PATCH requests. Supported fine-grained GitHub App user and installation tokens require the Enterprise AI controls permission set with matching read or write access. The enterprise AI controls reference documents these requirements alongside the request and response behavior.

Organization operations can be used by organization owners. OAuth app tokens and classic personal access tokens require admin:org or repo scope, while supported fine-grained tokens require Administration organization permissions with write access. Organization SAML authorization and OAuth app access restrictions also apply.

Integrations should receive only the permissions required for their task. A read-only policy inventory service, for example, should not be given the write permissions needed to change model settings.

Important team endpoint discrepancy

There is a material difference between the announcement and the current REST reference for enterprise-team requests. The announcement shows a path using team_slug, while the current REST documentation specifies a numeric team_id path parameter.

The supplied documentation does not establish whether both forms are accepted, whether they belong to different API revisions, or whether the announcement contains an inconsistency. For new implementations, use the currently documented numeric team_id format unless GitHub confirms that team_slug is also supported. Do not treat the slug-based path as confirmed behavior.

The enterprise-team PATCH request requires an enterprise identifier, the numeric team identifier, and a models array. Each model’s policy state can be enabled, disabled, or optional, subject to the model’s editability and the team’s policy configuration.

API versions and responses

GitHub’s supplied examples recommend the application/vnd.github+json Accept header and explicitly set X-GitHub-Api-Version: 2026-03-10. GitHub’s API versioning documentation states that requests without that header default to version 2022-11-28. Version 2026-03-10 is listed as currently supported without a scheduled end-of-support date in the supplied reference.

Documented organization operations may return 200, 401, 403, 404, or 422 responses, depending on the request and authorization state. The enterprise-team PATCH operation documents those statuses plus 503. Automation should handle authentication failures, authorization failures, missing resources, validation errors, and service-unavailable responses rather than assuming every request will succeed.

What administrators should do

  1. Identify the correct management scope: enterprise, enterprise team, enterprise app, or organization.
  2. Confirm that the organization is eligible for the organization endpoints and is not governed by enterprise teams for model policy.
  3. Use the current numeric team_id path format for enterprise-team requests.
  4. Check whether each target model is editable before attempting an update.
  5. Treat optional as a clearing operation for team and app policies, not as another persistent enabled state.
  6. Issue tokens with only the required read or write permissions.
  7. Send the recommended media type and an explicit supported API version.
  8. Handle the documented error and service-unavailable responses in administrative automation.

Organizations should also account for atomic update behavior. A request containing multiple model changes should be validated carefully because one unapplied change prevents the entire set from being saved.

Availability and remaining caveats

The GET and PATCH operations are generally available according to GitHub’s announcement. The supplied API references are GitHub Enterprise Cloud documentation and include GHE.com host-substitution guidance. They do not establish support for GitHub Enterprise Server, so deployment coverage should not be generalized beyond the documented environments.

The supplied material also does not document rate limits, pagination behavior, a complete model catalog, or rollout guarantees. Those details should be confirmed before building automation that depends on them.

Sources

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
Ad
Ad
Ad