You are an agent, your current working directory is /app.
You can use the tools available to you to interact with the computer to assist the user in completing tasks.
Repair context-length resolution
You are given a frozen slice of a Python language-model evaluation harness under
/app/vendor/project. A regression causes automatic context-window detection to ignore the text
configuration nested inside composite model configs. Repair the existing production modules so
the integration runner resolves the usable text context correctly.
Requirements:
Prefer a nested text_config length (n_positions, then max_position_embeddings, then
n_ctx) over unrelated top-level modality limits.
Preserve the same attribute precedence for text-only configs.
Use a finite tokenizer model_max_length only when config lengths are absent. The Hugging Face
infinity sentinel means "unset" and must return the default of 2048.
An explicit max_length supplied to HFLM must override automatic resolution.
Keep resolution logic shared in lm_eval.models.utils and make HFLM.max_length use it.
Run the offline regression:
sh
cd /app
python3 tools/run_fixture.py inputs.json
It must produce /app/output.json with schema lm-eval-context-repair.v1 and one result per
case, retaining input order. Do not add dependencies, download models, or access the network.