""" _config.py — receipts kit stub. The two scripts in this folder were originally run with a vault-internal _config module that wires up provider clients (xAI, Gemini), handles proxy-routed API keys, and provides shared helpers for retry. This file replaces that module with a documented stub. Importing it will succeed; calling any function will raise NotImplementedError with a pointer to the docstring describing what the original did. To reproduce generation end-to-end, replace each NotImplementedError body with a call to your own provider's SDK. The companion module [`claim_extraction.py`](./claim_extraction.py) ships verbatim and is fully runnable without any API access. It contains the regex-based claim extractor used by both scripts. You can run it on the bundled `generated_documents.json` to re-derive the temporal-stability numbers. """ GENERATOR_MODEL = "grok-4-1-fast" """xAI generator model used in the cross-generator replication.""" def _stub(name, summary): raise NotImplementedError( f"_config.{name} is a stub. {summary} " f"Replace with a call to your provider's SDK to reproduce." ) def get_xai_client(): """Return an xAI client. Original used a proxy-routed wrapper around the OpenAI SDK pointed at the xAI base URL with the XAI_API_KEY environment variable. Used by the cross-generator script. """ _stub("get_xai_client", "Original returned an OpenAI-compatible client with " "base_url=https://api.x.ai/v1 and api_key=os.environ['XAI_API_KEY'].") def get_gemini_client(): """Return a Gemini client. Original used google.genai with the GEMINI_API_KEY environment variable. Used by the cross-generator script for the Gemini family. """ _stub("get_gemini_client", "Original returned a google.genai.Client(api_key=" "os.environ['GEMINI_API_KEY']).") def call_generator(client, model, messages, max_retries=5, **kwargs): """Send a chat-completion request with retry on transient failure. Returns the response text. Dispatches on client type. """ _stub("call_generator", "Original wrapped client.chat.completions.create (xAI/OpenAI) " "or client.models.generate_content (Gemini) with retry.")