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 the frozen Hugging Face Transformers source tree under
/app/vendor/transformers. A pretrained inference path currently loses the
adapter keyword-argument state at the boundary between adapter discovery and
from_pretrained.
Complete the following workflow:
Inspect the adapter integration helper and its caller in the pretrained model
loader. Repair both existing production modules so their return/unpack
contract remains synchronized.
Preserve adapter keyword arguments through local adapter discovery. A private
_adapter_model_path hint must be consumed by discovery and must not be
forwarded later, while ordinary adapter options remain unchanged.
Preserve offline cache behavior: local_files_only, revision, subfolder, and
resolved commit metadata belong to discovery and must not be mixed into the
adapter kwargs passed to the later adapter load.
Keep early-return behavior valid when PEFT is unavailable or the model path is
absent, including the caller-visible adapter kwargs value.
Run the included integration workflow and write /app/output.json:
The output must use schema version transformers.adapter_contract.v1, include
one result for every fixture case, describe the repaired caller contract, and
set every reported check to true. Compile the two modified modules before
finishing. Do not modify the fixture, runner, unrelated vendored files, or add a
replacement evaluator. Runtime network access and package installation are not
available.