# Copyright (c) 2026 LlamaIndex, Inc. All rights reserved. # Licensed under the OCRia-1 Model and Code License (LICENSE at the root of this repository). # This is not open-source software: see the license for permitted uses. """Hill-climbing switches: OCRIA_ATTENTION_TUNE="flag,key=value,..." read once at import. Code behind a switch must behave as before when the switch is off, so earlier replays stay reproducible; a winning switch becomes the default and is removed (README.md).""" import os FLAGS: dict[str, str] = {} for _item in os.environ.get("OCRIA_ATTENTION_TUNE", "").split(","): if _item.strip(): _k, _, _v = _item.partition("=") FLAGS[_k.strip()] = _v.strip() or "1"