Source overrides
Control data sources on a per-message basis using source overrides.
This API is currently in Preview.
Overview
Source overrides allow you to limit which data sources Alfa uses when processing a specific message, with the option to permanently change the user’s default thread message data source settings.
Available source settings
The source overrides object supports the following fields:
If you don’t specify a value for a particular source in the override, the thread will use the user’s existing default setting for that source.
Send a message with source overrides
The source_overrides parameter must be a JSON string, not a JSON object. Convert your settings dictionary to a JSON string before including it in the request body.
Update thread defaults
Set update_default_settings: true to permanently update the user’s thread message data source settings. Future messages from this user will now inherit these settings.
When source_overrides is unspecified, it will use the user’s default thread message data source settings.
FAQ
Do source overrides affect streaming?
No. Source overrides only control which data sources Alfa uses for research. They do not affect how responses are delivered via SSE or gRPC streaming.
What's the difference between temporary and permanent overrides?
Temporary overrides (update_default_settings: false) apply only to the current message, while
permanent overrides (update_default_settings: true) update the user’s default settings for all
future messages, akin to making a settings change. Use temporary overrides when you need different sources for a single query,
and permanent overrides when you want to change the user’s thread message sourcing behavior going forward.
