Welcome to Portkey Forum

Updated 3 weeks ago

Troubleshooting Portkey AI API Errors with Multiple Keys and Configs

Hey team! Just running into this error, could anyone help?

I had one virtual key (say, K1) being used across all my prompts. Then I added two more keys (K2 and K3) and updated all my prompts to use K2. Added a config (C1) to use K2 and K3. Deleted K1. Now when I make an api call:
  • without config C1: the response is successful
  • with config C1: throws error - portkey_ai.api_resources.exceptions.BadRequestError: {"status":"failure","message":"Following keys are not valid: <k1>"}
v
b
6 comments
Once you update the config, sometimes it might take upto a minute to reflect. Can you please verify once again now if its still not working?
I had made the change few hours ago and it didn't reflect since then. But now I just switched over the order of keys to simulate a diff and hit the update button and it worked. Felt like some cache never invalidated the first time.
I faced a similar bug the other day, where I changed a model and it reflected well in the right panel. But on the prompts list page it showed the old model until I updated to some other model and reversed again.
Seems just like some rough edges, but overall not blockers in any form. : )
Strange. I will check if there are any cases which are breaking during sync/update.
Add a reply
Sign up and join the conversation on Discord