Skip auth headers for public IonQ /backends endpoints#1194
Conversation
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.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
/update-changelog |
Summary
Authorizationheader is sent to its unauthenticated/backendsroutes. Added_get_publichelper toIonQSessionthat uses plainrequests.get(no auth headers) forget_devicesandget_device./jobs,/characterizations) continue using the session as before.azure:ionq:sim:simulatortoionq:ionq:sim:simulator.Test plan
GET /backendsandGET /backends/{id}return 200 without auth, 401 with authGET /backends/{id}/characterizations/{id}still requires auth (unchanged)pytest tests/runtime/ionq/ --remote true)