Skip to content

Regenerate backend model for upstream OpenAPI drift#53

Open
Copilot wants to merge 2 commits into
mainfrom
copilot/update-openapi-spec
Open

Regenerate backend model for upstream OpenAPI drift#53
Copilot wants to merge 2 commits into
mainfrom
copilot/update-openapi-spec

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 1, 2026

Summary

Vendored openapi.json had drifted from upstream for the Backend schema. This updates the vendored spec and regenerates the client so the Python model surface matches current API fields.

  • Spec sync (openapi.json)
    • Added Backend properties:
      • supported_error_mitigations
      • supported_gates
      • supported_native_gates
  • Generated client update (ionq_core/models/backend.py)
    • Regenerated Backend model now includes the new optional fields in typed attrs + to_dict / from_dict.
  • Focused model coverage (tests/test_models.py)
    • Extended backend sample + assertions to verify parse and round-trip behavior for new fields.
BACKEND_SAMPLE = {
    "backend": "qpu.aria-1",
    "status": "available",
    "supported_error_mitigations": ["debiasing"],
    "supported_gates": ["x", "y", "z"],
    "supported_native_gates": ["gpi", "gpi2", "ms"],
}

Test plan

  • python -m uv run pytest

Important

Most code in ionq_core/ is auto-generated and overwritten on regeneration.
See CONTRIBUTING.md for which files are safe to edit.

Copilot AI linked an issue Jun 1, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Update client to match upstream OpenAPI spec changes Regenerate backend model for upstream OpenAPI drift Jun 1, 2026
Copilot AI requested a review from splch June 1, 2026 17:50
Copilot finished work on behalf of splch June 1, 2026 17:50
splch

This comment was marked as off-topic.

Copilot finished work on behalf of splch June 1, 2026 18:06
Copilot AI requested a review from splch June 1, 2026 18:06
@splch splch marked this pull request as ready for review June 1, 2026 18:07
@splch splch requested a review from a team as a code owner June 1, 2026 18:07
@splch splch dismissed their stale review June 1, 2026 18:07

just testing

Copy link
Copy Markdown

@natestemen natestemen left a comment

Choose a reason for hiding this comment

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

LGTM, but two questions:

  1. What does supported_gates mean? If the compiler is run when non-native gates are present, why can't any gate be decomposed into the native gate set?
  2. Instead of opening an issue and then manually (even if partially automated with an agent), why not just have the spec drift action open the PR directly and assign us? E.g. something like this: #55. Or is something needed for you (or someone else) to be in the loop for that I'm missing?

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.

OpenAPI spec has changed upstream

3 participants