diff options
| author | dev <dev@localhost> | 2026-10-21 22:14:10 +0000 |
|---|---|---|
| committer | dev <dev@localhost> | 2026-10-21 22:14:10 +0000 |
| commit | 49a527fc22447b85a0fe6fb945a6ece4e18de260 (patch) | |
| tree | fac6a9f64f2de6fbdeac0e9df6fc73b67fe8a951 /src/config/input.rs | |
| parent | 710f0daff34e4ae02cf906841117449bcf114198 (diff) | |
| download | aichat-49a527fc22447b85a0fe6fb945a6ece4e18de260.tar.gz | |
Thread idempotency key through the request path
Propagate the per-request Idempotency-Key (generated once in the retry
loop) through request construction so every retry attempt reuses the same
key rather than minting a new one.
- Add field to ChatCompletionsData.
- Generate a single key per logical request in chat_completions and
chat_completions_streaming.
- Thread the key through request_builder (macro-based clients), Bedrock,
and VertexAI so the header is attached once and reused on retries.
Diffstat (limited to 'src/config/input.rs')
| -rw-r--r-- | src/config/input.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/config/input.rs b/src/config/input.rs index 71807f3..facfd62 100644 --- a/src/config/input.rs +++ b/src/config/input.rs @@ -274,6 +274,7 @@ impl Input { top_p: *subquery_top_p, functions: subquery_functions.clone(), stream, + idempotency_key: None, }); } let mut messages = self.build_messages()?; @@ -287,6 +288,7 @@ impl Input { top_p, functions, stream, + idempotency_key: None, }) } |
