You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ruff format --check hindsight-api-slim/hindsight_api/config.py hindsight-api-slim/hindsight_api/engine/llm_wrapper.py hindsight-api-slim/hindsight_api/engine/memory_engine.py hindsight-api-slim/hindsight_api/engine/providers/openai_compatible_llm.py hindsight-api-slim/tests/test_config_validation.py hindsight-api-slim/tests/test_llm_wrapper.py
Targeted pytest did not run in this local environment: uv run cannot install onnxruntime==1.27.0 for macOS arm64, and the system Python environment is missing project deps such as asyncpg.
really nice bug report and fix — the repro and the ollama ps eviction trace made this trivial to verify. removing the hardcoded num_ctx=16384 and making it opt-in is exactly right, and the validation + regression tests are solid.
i pushed one small commit (da12fd93) adding HINDSIGHT_API_LLM_OLLAMA_NUM_CTX to .env.example (+ the byte-identical hindsight-embed copy) — new config flags need to land there per our checklist, and the env-template sync test stays green. hope you don't mind me pushing directly.
one thing to confirm before i merge: you're threading it from config.llm_ollama_num_ctx rather than per-member/per-bank, so it's static-global. i think that's the right call — context window is a property of the ollama host, not a per-bank preference — but it does diverge from the member.* pattern in that same ensemble block, so just confirm that's intentional and i'll merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
num_ctxunless it is explicitly configuredHINDSIGHT_API_LLM_OLLAMA_NUM_CTXand thread it through config,LLMProvider, andMemoryEnginenum_ctx=16384request behaviorFixes #2572.
Tests
python3 -m py_compile hindsight-api-slim/hindsight_api/config.py hindsight-api-slim/hindsight_api/engine/llm_wrapper.py hindsight-api-slim/hindsight_api/engine/memory_engine.py hindsight-api-slim/hindsight_api/engine/providers/openai_compatible_llm.py hindsight-api-slim/tests/test_config_validation.py hindsight-api-slim/tests/test_llm_wrapper.pyruff check hindsight-api-slim/hindsight_api/config.py hindsight-api-slim/hindsight_api/engine/llm_wrapper.py hindsight-api-slim/hindsight_api/engine/memory_engine.py hindsight-api-slim/hindsight_api/engine/providers/openai_compatible_llm.py hindsight-api-slim/tests/test_config_validation.py hindsight-api-slim/tests/test_llm_wrapper.pyruff format --check hindsight-api-slim/hindsight_api/config.py hindsight-api-slim/hindsight_api/engine/llm_wrapper.py hindsight-api-slim/hindsight_api/engine/memory_engine.py hindsight-api-slim/hindsight_api/engine/providers/openai_compatible_llm.py hindsight-api-slim/tests/test_config_validation.py hindsight-api-slim/tests/test_llm_wrapper.pyTargeted pytest did not run in this local environment:
uv runcannot installonnxruntime==1.27.0for macOS arm64, and the system Python environment is missing project deps such asasyncpg.