mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +00:00
refactor(transports/codex): trim duplicated cache-key comments
The xAI prompt_cache_key block carried two long comment paragraphs that either restated setdefault semantics, narrated the SDK type-validation mechanism, or recapped the historical motivation for the extra_body indirection — all already covered by the test docstring at test_xai_responses_sends_cache_key_via_extra_body (which links to the xAI docs). Also restored the truncated link in the body-injection comment. No behavior change.
This commit is contained in:
parent
e13c1b8060
commit
7fdc16dd4a
2 changed files with 6 additions and 19 deletions
|
|
@ -117,13 +117,8 @@ class TestCodexBuildKwargs:
|
|||
session_id="conv-xai-1",
|
||||
is_xai_responses=True,
|
||||
)
|
||||
# Top-level prompt_cache_key must NOT be set for xAI — the SDK
|
||||
# signature drop is what motivated the extra_body indirection in
|
||||
# the first place. The cache-routing field must travel in the
|
||||
# body via extra_body.
|
||||
assert "prompt_cache_key" not in kw
|
||||
assert kw.get("extra_body", {}).get("prompt_cache_key") == "conv-xai-1"
|
||||
# Header kept as belt-and-braces.
|
||||
assert kw.get("extra_headers", {}).get("x-grok-conv-id") == "conv-xai-1"
|
||||
|
||||
def test_xai_responses_extra_body_preserves_caller_fields(self, transport):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue