Skip to content

Skip auth headers for public IonQ /backends endpoints#1194

Open
ryanhill1 wants to merge 4 commits into
mainfrom
fix/ionq-public-endpoints-auth
Open

Skip auth headers for public IonQ /backends endpoints#1194
ryanhill1 wants to merge 4 commits into
mainfrom
fix/ionq-public-endpoints-auth

Conversation

@ryanhill1
Copy link
Copy Markdown
Member

Summary

  • IonQ's API returns 401 when an Authorization header is sent to its unauthenticated /backends routes. Added _get_public helper to IonQSession that uses plain requests.get (no auth headers) for get_devices and get_device.
  • Authenticated endpoints (/jobs, /characterizations) continue using the session as before.
  • Updated test device ID from azure:ionq:sim:simulator to ionq:ionq:sim:simulator.

Test plan

  • Verified GET /backends and GET /backends/{id} return 200 without auth, 401 with auth
  • Verified GET /backends/{id}/characterizations/{id} still requires auth (unchanged)
  • All 37 IonQ tests pass (pytest tests/runtime/ionq/ --remote true)
  • Pylint clean (no new warnings)

IonQ's API returns 401 when an Authorization header is sent to
its unauthenticated /backends routes. Use plain requests.get for
get_devices and get_device to avoid sending session auth headers
to these public endpoints. Authenticated endpoints (/jobs,
/characterizations) continue using the session as before.

Also update test device ID from azure:ionq:sim:simulator to
ionq:ionq:sim:simulator.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9a039557-a72e-4e40-b5d8-53fde38c39bf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ionq-public-endpoints-auth

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ryanhill1
Copy link
Copy Markdown
Member Author

/update-changelog

Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
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.

2 participants