mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-11 22:53:00 +00:00
Name fabro as the application on the model client
lithos-llm sends the application name as the codex `originator` header, so the OpenAI Codex deployment can tell which harness a request came from. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
df5c9d2c57
commit
0319b24585
1 changed files with 6 additions and 0 deletions
|
|
@ -16,6 +16,10 @@ use lithos_llm::types::Error;
|
|||
use crate::attachments::InlineLocalAttachments;
|
||||
use crate::error::LlmError;
|
||||
|
||||
/// The application name lithos reports to providers that ask, such as the
|
||||
/// `originator` header on the OpenAI Codex deployment.
|
||||
const APPLICATION_NAME: &str = "fabro";
|
||||
|
||||
/// Default same-provider retry policy applied before visible output.
|
||||
///
|
||||
/// Three attempts with short exponential backoff, capped at five seconds.
|
||||
|
|
@ -205,6 +209,7 @@ pub async fn build_client(
|
|||
}
|
||||
let builder = Client::builder()
|
||||
.catalog(catalog)
|
||||
.application(APPLICATION_NAME)
|
||||
.credentials_arc(lithos_credentials(source))
|
||||
.enabled_providers(ready.iter().cloned());
|
||||
let build = options.apply(builder).build()?;
|
||||
|
|
@ -226,6 +231,7 @@ pub fn build_offline_client(
|
|||
let ready: Vec<ProviderId> = options.adapter_providers().cloned().collect();
|
||||
let builder = Client::builder()
|
||||
.catalog(catalog)
|
||||
.application(APPLICATION_NAME)
|
||||
.enabled_providers(ready.iter().cloned());
|
||||
let build = options.apply(builder).build()?;
|
||||
Ok(FabroClient {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue