mirror of
https://github.com/usestrix/strix.git
synced 2026-10-01 02:03:55 +00:00
docs + unit test fix
This commit is contained in:
parent
c77bdd2c2a
commit
9b72488c92
2 changed files with 13 additions and 5 deletions
|
|
@ -49,6 +49,14 @@ Configure Strix using environment variables or a config file.
|
|||
Timeout in seconds for memory compression operations (context summarization).
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="STRIX_OPENROUTER_STICKY_SESSIONS" default="false" type="boolean">
|
||||
Send a per-agent `session_id` on OpenRouter requests, so each agent's calls stay on one upstream provider and its prompt cache carries over between turns. When unset, OpenRouter routes every request freely.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="STRIX_CACHE_BLOCK_TOKENS" default="128" type="integer">
|
||||
Token block size that providers cache prompts in. A turn counts as a cache miss in the run report only when the cached tokens fall at least this many tokens short of the previous prompt and the prompt did not shrink. Lower it for providers with smaller blocks (DeepSeek and GLM use 64; vLLM defaults to 16).
|
||||
</ParamField>
|
||||
|
||||
### Dedicated deduplication model
|
||||
|
||||
Finding deduplication is a cheap, structured classification task. By default it
|
||||
|
|
|
|||
|
|
@ -381,11 +381,11 @@ def test_openrouter_request_carries_agent_session_id() -> None:
|
|||
assert "session_id" not in body()
|
||||
token = request_log.bind_call_context("a1b2c3d4", "root")
|
||||
try:
|
||||
session_id = body()["session_id"]
|
||||
assert str(uuid.UUID(session_id)) == session_id
|
||||
assert body()["session_id"] == session_id
|
||||
assert "session_id" not in body()
|
||||
with patch("strix.config.models.load_settings") as settings:
|
||||
settings.return_value.llm.openrouter_sticky_sessions = False
|
||||
assert "session_id" not in body()
|
||||
settings.return_value.llm.openrouter_sticky_sessions = True
|
||||
session_id = body()["session_id"]
|
||||
assert str(uuid.UUID(session_id)) == session_id
|
||||
assert body()["session_id"] == session_id
|
||||
finally:
|
||||
request_log.reset_call_context(token)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue