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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user