{"record":{"id":"91e1cf9eb5b00b2a","repo":"github/copilot-sdk","slug":"unsupported-copilot-runtime-platform-key-0-ke","errorCode":null,"errorMessage":"Unsupported Copilot runtime platform: {key[0]}/{key[1]}. Supported platforms: {', '.join(f'{p}/{m}' for p, m in RUNTIME_PLATFORMS)}","messagePattern":"Unsupported Copilot runtime platform: (.+?)/(.+?)\\. Supported platforms: (.+?)/(.+?)' for p, m in RUNTIME_PLATFORMS\\)\\}","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"python/copilot/_cli_version.py","lineNumber":91,"sourceCode":"    return f\"{base}/v{version}/SHA256SUMS.txt\"\n\n\ndef get_runtime_platform() -> str:\n    \"\"\"Return the release asset platform name (e.g. ``linux-x64``) for this host.\n\n    The name matches the ``prebuilds`` folder embedded in the release package.\n    Raises RuntimeError if the platform is not supported.\n    \"\"\"\n    key = get_platform_key()\n\n    if key[0] == \"linux\" and _is_musl():\n        musl = _MUSL_RUNTIME_PLATFORMS.get(key[1])\n        if musl:\n            return musl\n\n    runtime_platform = RUNTIME_PLATFORMS.get(key)\n    if runtime_platform is None:\n        raise RuntimeError(\n            f\"Unsupported Copilot runtime platform: {key[0]}/{key[1]}. \"\n            f\"Supported platforms: {', '.join(f'{p}/{m}' for p, m in RUNTIME_PLATFORMS)}\"\n        )\n    return runtime_platform\n\n\ndef get_release_asset_name(version: str, runtime_platform: str | None = None) -> str:\n    \"\"\"Return the unified runtime package asset name for a version and platform.\"\"\"\n    platform_name = runtime_platform or get_runtime_platform()\n    return f\"github-copilot-{version}-{platform_name}.tgz\"\n\n\ndef get_cli_binary_name() -> str:\n    \"\"\"Return the CLI executable name inside the release package.\"\"\"\n    return \"copilot.exe\" if sys.platform == \"win32\" else \"copilot\"\n","sourceCodeStart":73,"sourceCodeEnd":107,"githubUrl":"https://github.com/github/copilot-sdk/blob/cd8cf15dc3f9e762615790aaed0a771a0f392755/python/copilot/_cli_version.py#L73-L107","documentation":"get_runtime_platform maps (system, machine) pairs to Copilot runtime platform identifiers, applying musl-specific aliases for Linux libc variants. If the running platform is not a key in RUNTIME_PLATFORMS, the library cannot pick a runtime build and raises this error listing all supported platform strings.","triggerScenarios":"Calling get_cached_cli_path, ensure_runtime_wrapper, ensure_runtime_library, get_or_download_cli, or get_release_asset_name on a system/machine combination absent from RUNTIME_PLATFORMS (e.g. freebsd, sunos5, armv7l, or an unusual machine tag from platform.system()/platform.machine()).","commonSituations":"Running on an unsupported OS or architecture (FreeBSD, 32-bit ARM); running under a modified platform reported by an embedded/emulated interpreter; an older library version lacking a newly released platform key.","solutions":["Upgrade python/copilot package to a version that supports your platform in RUNTIME_PLATFORMS.","Run on a supported OS/architecture listed in the error message (e.g. darwin/arm64, linux/x86_64).","If on Linux musl, confirm the libc alias mapping (_MUSL_RUNTIME_PLATFORMS) covers your machine string.","Pin the interpreter to run on a supported host rather than an exotic emulated platform."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import platform\nfrom copilot._cli_version import RUNTIME_PLATFORMS\nkey = (platform.system(), platform.machine())\nif key not in RUNTIME_PLATFORMS:\n    raise RuntimeError(f\"unsupported runtime platform {key}\")","typeGuard":null,"tryCatchPattern":"try:\n    platform_id = get_runtime_platform()\nexcept RuntimeError as e:\n    if e.args[0].startswith(\"Unsupported Copilot runtime platform\"):\n        fall_back_to_remote_runtime()","preventionTips":["Check supported platforms before deployment to non-standard hosts.","Pin deployments to a supported OS/architecture matrix.","Keep the library updated for new platform support."],"tags":["platform","unsupported-os","runtime"],"backgroundTag":"unsupported-platform","analyzedSha":"cd8cf15dc3f9e762615790aaed0a771a0f392755","analyzedAt":"2026-09-09T18:32:31.973Z","contentChangedAt":"2026-09-09T18:32:31.973Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}