Use `anyio.to_thread.run_sync` for CLI provider credential I/O

Merged
KL
2mo ago
+10-8

Related to #7112. This prepares CLI provider credential I/O for Trio; it does not resolve the Agent.run() failure described in that issue.

Summary

Use anyio.to_thread.run_sync for credential lookup and persistence in the OpenRouter and vLLM CLI model providers. This removes their remaining asyncio imports. Preserve cancellation behavior with abandon_on_cancel=True.

Verification

  • CI passed: 24 successful checks, 27 skipped checks, one neutral check.
  • Ruff and pre-commit checks passed.
  • The existing provider tests ran on asyncio in CI. Local collection requires termflow, which is absent from this checkout.

Checklist

  • No breaking changes in accordance with the version policy.
  • Any permitted compatibility impact has a label, warning, migration, release note, and exact API-check waiver. (Not applicable.)
  • PR title is fit for the release changelog.

AI Disclaimer

This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.