Configs
Last updated
Was this helpful?
Last updated
Was this helpful?
This feature is available on all Portkey plans.
Configs streamline your Gateway management, enabling you to programmatically control various aspects like fallbacks, load balancing, retries, caching, and more.
A configuration is a JSON object that can be used to define routing rules for all the requests coming to your gateway. You can configure multiple configs and use them in your requests.
Navigate to the ‘Configs’ page in the Portkey app and click 'Create' to start writing a new config.
Configs are supported across all integrations.
Through the config headers in the OpenAI SDK
Via the REST API through the x-portkey-config
header
If you want to attach the configuration to only a few requests instead of modifying the client, you can send it in the request headers for OpenAI or in the config parameter while using the Portkey SDK.
Note: If you have a default configuration set in the client, but also include a configuration in a specific request, the request-specific configuration will take precedence and replace the default config for that particular request.
You can also see the ID of the specific Config used for a request separately in the log details, and jump into viewing/editing it directly from the log details page.
The config object is defined here
Through the config parameter of the Portkey SDK client(Directly or via )
Gateway allow you to unlock the gateway superpowers of Portkey. You can create a config in the UI and attach it's config id in the OpenAI client.
Portkey shows your Config usage smartly on the logs page with the Status column and gives you a snapshot of the Gateway activity for every request. .