Skip to content

fix: correctly report Windows 11 in device model header#3

Open
JerryAZR wants to merge 1 commit into
Leechael:mainfrom
JerryAZR:fix-windows-11-detection
Open

fix: correctly report Windows 11 in device model header#3
JerryAZR wants to merge 1 commit into
Leechael:mainfrom
JerryAZR:fix-windows-11-detection

Conversation

@JerryAZR
Copy link
Copy Markdown

@JerryAZR JerryAZR commented Apr 24, 2026

Problem

On Windows 11, getDeviceModel() currently reports the device as Windows 10.0.26200 x86_64 (or similar) because
Node.js's os.release() returns the kernel version string (e.g. "10.0.26200"), which uses the Windows 10 major
version even on Windows 11.

Expected behavior

The upstream kimi-cli (Python) detects Windows 11 by checking sys.getwindowsversion().build and reports Windows 11 x86_64 when the build is ≥ 22000. This provider should match that behavior.

Fix

  • Parse the build number from os.release() on Windows.
  • If the major version is "10" and the build is ≥ 22000, report "11" instead.
  • Only output the major release (e.g. Windows 10, Windows 11) to match the upstream kimi-cli logic.

Reference

Upstream Python implementation:
kimi-cli/auth/oauth.pydef _device_model() -> str:


Summary by cubic

Fix Windows device model header to report Windows 11 by parsing the build from os.release() and mapping build ≥22000 to version 11. Only the major Windows version is sent (e.g., "Windows 10", "Windows 11"), matching kimi-cli.

Written for commit 4a5a6a7. Summary will update on new commits.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

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