Skip to content

fix(sdk): preserve distinct schemas with colliding model names - #1460

Merged
jackmusick merged 2 commits into
mainfrom
1457-sdk-model-collisions
Nov 18, 2026
Merged

jackmusick merged 2 commits into
mainfrom
1457-sdk-model-collisions

Conversation

@jackmusick

Copy link
Copy Markdown
Collaborator

Summary

Fixes #1457.

Reserve generated model names by schema identity before rendering fields or method return types. Distinct schema paths that flatten to the same Python name receive deterministic path-derived suffixes, including component-versus-inline and response collisions. Unambiguous names retain their existing spelling, and a final uniqueness check prevents silent duplicate definitions.

Existing stored SDKs are unchanged until regenerated. No API, permissions, dependencies, or install steps change.

Reported by @MTG-Thomas in #1457.

Validation

  • ./test.sh tests/unit/services/test_sdk_generator_model_names.py tests/unit/services/test_sdk_generator_descriptions.py tests/unit/services/test_sdk_generator_source_safety.py tests/unit/services/test_sdk_generator_url_validation.py tests/unit/services/test_sdk_generator_client_pool.py — 53 passed, zero skipped.
  • ./test.sh quality api — Python lint and type checks.
  • Regression coverage imports generated code, resolves annotations, and verifies that both colliding shapes remain addressable; also checks deterministic output and response references.
  • Full backend E2E and frontend suites were not run locally; the protected merge queue provides the broad gate.

Product Updates

Omit: routine SDK generator correctness repair, with no new feature or breaking contract.

@jackmusick
jackmusick enabled auto-merge November 18, 2026 11:13
@jackmusick
jackmusick added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit c2628a4 Nov 18, 2026
20 checks passed
@jackmusick
jackmusick deleted the 1457-sdk-model-collisions branch November 18, 2026 11:55
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.

SDK generator emits duplicate class names for nested schemas under different parents

1 participant