Commit 20f6303
authored
terminus2 agent (#343)
* [Feature] Support terminus2 adapter
* [Refactor] Wrap harbor.Terminus2 in Terminus2Adapter
- Replace terminal-bench-based wrapping with a thin adapter over
harbor.agents.terminus_2.Terminus2; harbor's LiteLLM layer sets
reraise=True, so auth/rate-limit errors surface instead of being
swallowed by nested RetryError.
- Bundle a lazy LocalSandboxEnvironment factory exposing harbor's
BaseEnvironment via local subprocess/shutil — the adapter runs inside
the lagent sandbox daemon, and lazy build keeps `import lagent.adapters`
working without harbor on PYTHONPATH.
* [Feature] Support get_messages in Terminus2Adapter
* [Fix] Capture terminus2 trajectory on timeout and support whitebox get_messages
* [Refactor] Route Terminus2Adapter LLM calls solely through the proxy
- Drop base_url/api_key from Terminus2Adapter.__init__; always use
self.proxy.url and sk-proxy-{session_id}. As a black-box adapter, an
explicit base_url/api_key alongside the proxy only muddies which endpoint
is actually used.
- Require the SessionClient proxy: setup() raises if it is missing, and the
whitebox (proxy is None) fallbacks in run_external_async / get_messages are
removed.
- Remove SessionClient.get_records; get_messages reads self.proxy._records
directly so the per-turn dedup logic stays in the adapter, not the proxy.1 parent 9cb1a99 commit 20f6303
2 files changed
Lines changed: 533 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
0 commit comments