Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
229 commits
Select commit Hold shift + click to select a range
a0cda02
feat(harness): add litellm/__init__.py
ishaan-berri Sep 30, 2026
ee63d1a
feat(harness): add litellm/constants.py
ishaan-berri Sep 30, 2026
a05002b
feat(harness): add litellm/harness/__init__.py
ishaan-berri Sep 30, 2026
75472e2
feat(harness): add litellm/harness/adapters/__init__.py
ishaan-berri Sep 30, 2026
a2da943
feat(harness): add litellm/harness/adapters/base.py
ishaan-berri Sep 30, 2026
73751c3
feat(harness): add litellm/harness/adapters/claude_code.py
ishaan-berri Sep 30, 2026
e73a85b
feat(harness): add litellm/harness/adapters/codex.py
ishaan-berri Sep 30, 2026
0735ccc
feat(harness): add litellm/harness/adapters/opencode.py
ishaan-berri Sep 30, 2026
1109208
feat(harness): add litellm/harness/endpoint.py
ishaan-berri Sep 30, 2026
88caf51
feat(harness): add litellm/harness/errors.py
ishaan-berri Sep 30, 2026
38bb7b7
feat(harness): add litellm/harness/options.py
ishaan-berri Sep 30, 2026
cb3bd96
feat(harness): add litellm/harness/runtime.py
ishaan-berri Sep 30, 2026
7665107
feat(harness): add litellm/harness/sandbox/__init__.py
ishaan-berri Sep 30, 2026
aa78637
feat(harness): add litellm/harness/sandbox/base.py
ishaan-berri Sep 30, 2026
e5220ce
feat(harness): add litellm/harness/sandbox/docker.py
ishaan-berri Sep 30, 2026
2c5b66c
feat(harness): add litellm/harness/sandbox/local.py
ishaan-berri Sep 30, 2026
486d697
feat(harness): add litellm/harness/sandbox/snapshot.py
ishaan-berri Sep 30, 2026
390149e
feat(harness): add litellm/harness/sync.py
ishaan-berri Sep 30, 2026
916ad65
feat(harness): add litellm/harness/types.py
ishaan-berri Sep 30, 2026
ab7acd9
feat(harness): add litellm/sandbox/__init__.py
ishaan-berri Sep 30, 2026
0ef2dc3
feat(harness): add README.md
ishaan-berri Sep 30, 2026
efce9e0
feat(harness): add tests/harness_e2e/__init__.py
ishaan-berri Sep 30, 2026
e92bf5a
feat(harness): add tests/harness_e2e/conftest.py
ishaan-berri Sep 30, 2026
c20301f
feat(harness): add tests/harness_e2e/test_harness_e2e.py
ishaan-berri Sep 30, 2026
2f481d4
feat(harness): add tests/test_litellm/harness/__init__.py
ishaan-berri Sep 30, 2026
4134f94
feat(harness): add tests/test_litellm/harness/adapters/__init__.py
ishaan-berri Sep 30, 2026
1a26923
feat(harness): add tests/test_litellm/harness/adapters/fixtures/claud…
ishaan-berri Sep 30, 2026
b8982b9
feat(harness): add tests/test_litellm/harness/adapters/fixtures/claud…
ishaan-berri Sep 30, 2026
a0d7bd7
feat(harness): add tests/test_litellm/harness/adapters/fixtures/claud…
ishaan-berri Sep 30, 2026
7292057
feat(harness): add tests/test_litellm/harness/adapters/fixtures/claud…
ishaan-berri Sep 30, 2026
95d8165
feat(harness): add tests/test_litellm/harness/adapters/fixtures/claud…
ishaan-berri Sep 30, 2026
6d8f459
feat(harness): add tests/test_litellm/harness/adapters/fixtures/codex…
ishaan-berri Sep 30, 2026
fe3443b
feat(harness): add tests/test_litellm/harness/adapters/fixtures/codex…
ishaan-berri Sep 30, 2026
c9edf7d
feat(harness): add tests/test_litellm/harness/adapters/fixtures/codex…
ishaan-berri Sep 30, 2026
a2f36f3
feat(harness): add tests/test_litellm/harness/adapters/fixtures/codex…
ishaan-berri Sep 30, 2026
f120ba5
feat(harness): add tests/test_litellm/harness/adapters/fixtures/codex…
ishaan-berri Sep 30, 2026
24414da
feat(harness): add tests/test_litellm/harness/adapters/fixtures/openc…
ishaan-berri Sep 30, 2026
42903ad
feat(harness): add tests/test_litellm/harness/adapters/fixtures/openc…
ishaan-berri Sep 30, 2026
f01ccb5
feat(harness): add tests/test_litellm/harness/adapters/fixtures/openc…
ishaan-berri Sep 30, 2026
9669303
feat(harness): add tests/test_litellm/harness/adapters/fixtures/openc…
ishaan-berri Sep 30, 2026
52c585d
feat(harness): add tests/test_litellm/harness/adapters/fixtures/openc…
ishaan-berri Sep 30, 2026
793a78d
feat(harness): add tests/test_litellm/harness/adapters/test_claude_co…
ishaan-berri Sep 30, 2026
8f8525d
feat(harness): add tests/test_litellm/harness/adapters/test_codex.py
ishaan-berri Sep 30, 2026
5bf34e1
feat(harness): add tests/test_litellm/harness/adapters/test_opencode.py
ishaan-berri Sep 30, 2026
b5e4697
feat(harness): add tests/test_litellm/harness/core_fakes.py
ishaan-berri Sep 30, 2026
678483a
feat(harness): add tests/test_litellm/harness/sandbox/__init__.py
ishaan-berri Sep 30, 2026
a81dfeb
feat(harness): add tests/test_litellm/harness/sandbox/test_docker.py
ishaan-berri Sep 30, 2026
bef7583
feat(harness): add tests/test_litellm/harness/sandbox/test_local.py
ishaan-berri Sep 30, 2026
9d01dab
feat(harness): add tests/test_litellm/harness/sandbox/test_snapshot.py
ishaan-berri Sep 30, 2026
387c61b
feat(harness): add tests/test_litellm/harness/test_endpoint.py
ishaan-berri Sep 30, 2026
ba8f174
feat(harness): add tests/test_litellm/harness/test_init.py
ishaan-berri Sep 30, 2026
8f831d5
feat(harness): add tests/test_litellm/harness/test_runtime.py
ishaan-berri Sep 30, 2026
ebd0745
feat(harness): add tests/test_litellm/harness/test_sync.py
ishaan-berri Sep 30, 2026
5fba073
feat(harness): add tests/test_litellm/harness/test_types.py
ishaan-berri Sep 30, 2026
4f8c85c
test(harness): use word recall in stream e2e test
ishaan-berri Sep 30, 2026
431a94f
refactor(harness): update litellm/__init__.py
ishaan-berri Sep 30, 2026
f1b6223
refactor(harness): update litellm/constants.py
ishaan-berri Sep 30, 2026
cfb1ab1
refactor(harness): update litellm/harness/__init__.py
ishaan-berri Sep 30, 2026
2fa7d8a
refactor(harness): remove litellm/harness/adapters/__init__.py
ishaan-berri Sep 30, 2026
38489cd
refactor(harness): update litellm/harness/context.py
ishaan-berri Sep 30, 2026
744089c
refactor(harness): update litellm/harness/endpoint.py
ishaan-berri Sep 30, 2026
f100b32
refactor(harness): update litellm/harness/handlers/__init__.py
ishaan-berri Sep 30, 2026
24129cd
refactor(harness): update litellm/harness/handlers/base.py
ishaan-berri Sep 30, 2026
e8256f1
refactor(harness): update litellm/harness/handlers/cli_handler.py
ishaan-berri Sep 30, 2026
f6f766d
refactor(harness): update litellm/harness/handlers/deepagents_handler.py
ishaan-berri Sep 30, 2026
5de0892
refactor(harness): update litellm/harness/runtime.py
ishaan-berri Sep 30, 2026
3d8e54e
refactor(harness): update litellm/harness/sandbox/docker.py
ishaan-berri Sep 30, 2026
0b28f33
refactor(harness): update litellm/harness/sandbox/local.py
ishaan-berri Sep 30, 2026
441a733
refactor(harness): update litellm/harness/sync.py
ishaan-berri Sep 30, 2026
84d7514
refactor(harness): update litellm/harness/types.py
ishaan-berri Sep 30, 2026
07a4ce2
refactor(harness): update litellm/llms/base_llm/harness/__init__.py
ishaan-berri Sep 30, 2026
328ef3c
refactor(harness): update litellm/llms/base_llm/harness/transformatio…
ishaan-berri Sep 30, 2026
6b0decd
refactor(harness): update litellm/llms/base_llm/harness/utils.py
ishaan-berri Sep 30, 2026
a846fcd
refactor(harness): update litellm/llms/claude_code/__init__.py
ishaan-berri Sep 30, 2026
5b7bb14
refactor(harness): update litellm/llms/claude_code/harness/__init__.py
ishaan-berri Sep 30, 2026
c5df8b7
refactor(harness): update litellm/llms/claude_code/harness/transforma…
ishaan-berri Sep 30, 2026
fdb569c
refactor(harness): update litellm/llms/codex/__init__.py
ishaan-berri Sep 30, 2026
aaa1fdb
refactor(harness): update litellm/llms/codex/harness/__init__.py
ishaan-berri Sep 30, 2026
21f7fed
refactor(harness): update litellm/llms/codex/harness/transformation.py
ishaan-berri Sep 30, 2026
7e4a7b9
refactor(harness): update litellm/llms/deepagents/__init__.py
ishaan-berri Sep 30, 2026
7b46751
refactor(harness): update litellm/llms/deepagents/harness/__init__.py
ishaan-berri Sep 30, 2026
40fd53e
refactor(harness): update litellm/llms/deepagents/harness/sandbox_bac…
ishaan-berri Sep 30, 2026
48f402f
refactor(harness): update litellm/llms/deepagents/harness/transformat…
ishaan-berri Sep 30, 2026
8bcbfaa
refactor(harness): update litellm/llms/opencode/__init__.py
ishaan-berri Sep 30, 2026
dc2a414
refactor(harness): update litellm/llms/opencode/harness/__init__.py
ishaan-berri Sep 30, 2026
fcb1b3d
refactor(harness): update litellm/llms/opencode/harness/transformatio…
ishaan-berri Sep 30, 2026
366cca4
refactor(harness): update litellm/utils.py
ishaan-berri Sep 30, 2026
b232fb7
refactor(harness): update README.md
ishaan-berri Sep 30, 2026
20acd1f
refactor(harness): update tests/harness_e2e/conftest.py
ishaan-berri Sep 30, 2026
f92637e
refactor(harness): update tests/harness_e2e/test_harness_e2e.py
ishaan-berri Sep 30, 2026
d1b6e8e
refactor(harness): remove tests/test_litellm/harness/__init__.py
ishaan-berri Sep 30, 2026
1f6c15b
refactor(harness): remove tests/test_litellm/harness/adapters/__init_…
ishaan-berri Sep 30, 2026
f1287fb
refactor(harness): remove tests/test_litellm/harness/adapters/fixture…
ishaan-berri Sep 30, 2026
5042078
refactor(harness): remove tests/test_litellm/harness/adapters/fixture…
ishaan-berri Sep 30, 2026
a4cf652
refactor(harness): remove tests/test_litellm/harness/adapters/fixture…
ishaan-berri Sep 30, 2026
6945390
refactor(harness): remove tests/test_litellm/harness/adapters/fixture…
ishaan-berri Sep 30, 2026
d06240d
refactor(harness): remove tests/test_litellm/harness/adapters/fixture…
ishaan-berri Sep 30, 2026
5c1fb65
refactor(harness): remove tests/test_litellm/harness/adapters/fixture…
ishaan-berri Sep 30, 2026
7af7823
refactor(harness): remove tests/test_litellm/harness/adapters/fixture…
ishaan-berri Sep 30, 2026
e17cc12
refactor(harness): remove tests/test_litellm/harness/adapters/fixture…
ishaan-berri Sep 30, 2026
34194fb
refactor(harness): remove tests/test_litellm/harness/adapters/fixture…
ishaan-berri Sep 30, 2026
2555f43
refactor(harness): remove tests/test_litellm/harness/adapters/fixture…
ishaan-berri Sep 30, 2026
826024f
refactor(harness): remove tests/test_litellm/harness/adapters/fixture…
ishaan-berri Sep 30, 2026
69e7fee
refactor(harness): remove tests/test_litellm/harness/adapters/fixture…
ishaan-berri Sep 30, 2026
f066343
refactor(harness): remove tests/test_litellm/harness/adapters/fixture…
ishaan-berri Sep 30, 2026
b0d493e
refactor(harness): remove tests/test_litellm/harness/adapters/fixture…
ishaan-berri Sep 30, 2026
a7b49b7
refactor(harness): remove tests/test_litellm/harness/adapters/fixture…
ishaan-berri Sep 30, 2026
a33e60b
refactor(harness): remove tests/test_litellm/harness/adapters/test_cl…
ishaan-berri Sep 30, 2026
908655a
refactor(harness): remove tests/test_litellm/harness/adapters/test_co…
ishaan-berri Sep 30, 2026
adeaa82
refactor(harness): remove tests/test_litellm/harness/adapters/test_op…
ishaan-berri Sep 30, 2026
58ca45a
refactor(harness): remove tests/test_litellm/harness/core_fakes.py
ishaan-berri Sep 30, 2026
0eb4537
refactor(harness): remove tests/test_litellm/harness/sandbox/__init__.py
ishaan-berri Sep 30, 2026
1c5e0ea
refactor(harness): remove tests/test_litellm/harness/sandbox/test_doc…
ishaan-berri Sep 30, 2026
8cbb81a
refactor(harness): remove tests/test_litellm/harness/sandbox/test_loc…
ishaan-berri Sep 30, 2026
5a3c2db
refactor(harness): remove tests/test_litellm/harness/sandbox/test_sna…
ishaan-berri Sep 30, 2026
2780c33
refactor(harness): remove tests/test_litellm/harness/test_endpoint.py
ishaan-berri Sep 30, 2026
c94f152
refactor(harness): remove tests/test_litellm/harness/test_init.py
ishaan-berri Sep 30, 2026
d427ace
refactor(harness): remove tests/test_litellm/harness/test_runtime.py
ishaan-berri Sep 30, 2026
900075f
refactor(harness): remove tests/test_litellm/harness/test_sync.py
ishaan-berri Sep 30, 2026
28d8d9b
refactor(harness): remove tests/test_litellm/harness/test_types.py
ishaan-berri Sep 30, 2026
7f8e1e9
refactor(harness): update tests/unit/harness/__init__.py
ishaan-berri Sep 30, 2026
b8b5b27
refactor(harness): update tests/unit/harness/core_fakes.py
ishaan-berri Sep 30, 2026
819c6b5
refactor(harness): update tests/unit/harness/handlers/__init__.py
ishaan-berri Sep 30, 2026
b3108ea
refactor(harness): update tests/unit/harness/handlers/test_deepagents…
ishaan-berri Sep 30, 2026
6bb064e
refactor(harness): update tests/unit/harness/sandbox/__init__.py
ishaan-berri Sep 30, 2026
37c117d
refactor(harness): update tests/unit/harness/sandbox/test_docker.py
ishaan-berri Sep 30, 2026
3df6db6
refactor(harness): update tests/unit/harness/sandbox/test_local.py
ishaan-berri Sep 30, 2026
86b90a0
refactor(harness): update tests/unit/harness/sandbox/test_snapshot.py
ishaan-berri Sep 30, 2026
3919054
refactor(harness): update tests/unit/harness/test_endpoint.py
ishaan-berri Sep 30, 2026
805b802
refactor(harness): update tests/unit/harness/test_init.py
ishaan-berri Sep 30, 2026
d337611
refactor(harness): update tests/unit/harness/test_runtime.py
ishaan-berri Sep 30, 2026
cd5f678
refactor(harness): update tests/unit/harness/test_sync.py
ishaan-berri Sep 30, 2026
a36ce85
refactor(harness): update tests/unit/harness/test_types.py
ishaan-berri Sep 30, 2026
0a899e6
refactor(harness): update tests/unit/llms/claude_code/__init__.py
ishaan-berri Sep 30, 2026
e658e58
refactor(harness): update tests/unit/llms/claude_code/harness/__init_…
ishaan-berri Sep 30, 2026
a883af2
refactor(harness): update tests/unit/llms/claude_code/harness/fixture…
ishaan-berri Sep 30, 2026
23796a3
refactor(harness): update tests/unit/llms/claude_code/harness/fixture…
ishaan-berri Sep 30, 2026
52eb557
refactor(harness): update tests/unit/llms/claude_code/harness/fixture…
ishaan-berri Sep 30, 2026
b0799b5
refactor(harness): update tests/unit/llms/claude_code/harness/fixture…
ishaan-berri Sep 30, 2026
f53a62b
refactor(harness): update tests/unit/llms/claude_code/harness/fixture…
ishaan-berri Sep 30, 2026
1f3a259
refactor(harness): update tests/unit/llms/claude_code/harness/test_tr…
ishaan-berri Sep 30, 2026
97ac84e
refactor(harness): update tests/unit/llms/codex/__init__.py
ishaan-berri Sep 30, 2026
399624c
refactor(harness): update tests/unit/llms/codex/harness/__init__.py
ishaan-berri Sep 30, 2026
fb84824
refactor(harness): update tests/unit/llms/codex/harness/fixtures/reas…
ishaan-berri Sep 30, 2026
f3f192c
refactor(harness): update tests/unit/llms/codex/harness/fixtures/stru…
ishaan-berri Sep 30, 2026
471ca92
refactor(harness): update tests/unit/llms/codex/harness/fixtures/turn…
ishaan-berri Sep 30, 2026
dd5b9ee
refactor(harness): update tests/unit/llms/codex/harness/fixtures/turn…
ishaan-berri Sep 30, 2026
29d7d8b
refactor(harness): update tests/unit/llms/codex/harness/fixtures/turn…
ishaan-berri Sep 30, 2026
7aedfa0
refactor(harness): update tests/unit/llms/codex/harness/test_transfor…
ishaan-berri Sep 30, 2026
31fca31
refactor(harness): update tests/unit/llms/deepagents/__init__.py
ishaan-berri Sep 30, 2026
627af9d
refactor(harness): update tests/unit/llms/deepagents/harness/__init__.py
ishaan-berri Sep 30, 2026
f80f0dd
refactor(harness): update tests/unit/llms/deepagents/harness/test_tra…
ishaan-berri Sep 30, 2026
3cf237f
refactor(harness): update tests/unit/llms/opencode/__init__.py
ishaan-berri Sep 30, 2026
da8aac7
refactor(harness): update tests/unit/llms/opencode/harness/__init__.py
ishaan-berri Sep 30, 2026
b376b2b
refactor(harness): update tests/unit/llms/opencode/harness/fixtures/a…
ishaan-berri Sep 30, 2026
d4b3263
refactor(harness): update tests/unit/llms/opencode/harness/fixtures/e…
ishaan-berri Sep 30, 2026
7d78785
refactor(harness): update tests/unit/llms/opencode/harness/fixtures/r…
ishaan-berri Sep 30, 2026
dc4dc4a
refactor(harness): update tests/unit/llms/opencode/harness/fixtures/t…
ishaan-berri Sep 30, 2026
0765f84
refactor(harness): update tests/unit/llms/opencode/harness/fixtures/t…
ishaan-berri Sep 30, 2026
115ce53
refactor(harness): update tests/unit/llms/opencode/harness/test_trans…
ishaan-berri Sep 30, 2026
01abe25
ci: allowlist tests/harness_e2e, which needs live runtimes and a gateway
ishaan-berri Sep 30, 2026
ba0052f
fix(harness): bound the turn event queue
ishaan-berri Sep 30, 2026
e11c437
fix(harness): bound the turn event queue with backpressure
ishaan-berri Sep 30, 2026
946d520
style: sort imports in utils
ishaan-berri Sep 30, 2026
f76c2ac
ci: exclude agent-harness config folders from provider docs check
ishaan-berri Sep 30, 2026
3843b95
refactor(harness): update tests/harness_e2e/conftest.py
ishaan-berri Sep 30, 2026
bc7a503
refactor(harness): update tests/harness_e2e/test_harness_e2e.py
ishaan-berri Sep 30, 2026
3968afe
refactor(harness): update tests/unit/harness/core_fakes.py
ishaan-berri Sep 30, 2026
7ebadcd
refactor(harness): update tests/unit/harness/handlers/test_deepagents…
ishaan-berri Sep 30, 2026
dd18802
refactor(harness): update tests/unit/harness/test_runtime.py
ishaan-berri Sep 30, 2026
1a55ed2
refactor(harness): update tests/unit/harness/test_sync.py
ishaan-berri Sep 30, 2026
73c8fa6
refactor(harness): update tests/unit/llms/deepagents/harness/test_tra…
ishaan-berri Sep 30, 2026
a0bb354
refactor(harness): update tests/unit/llms/opencode/harness/test_trans…
ishaan-berri Sep 30, 2026
5737d10
refactor(harness): update litellm/harness/endpoint.py
ishaan-berri Sep 30, 2026
f8c725b
refactor(harness): update litellm/harness/handlers/deepagents_handler.py
ishaan-berri Sep 30, 2026
b5f0049
refactor(harness): update litellm/harness/options.py
ishaan-berri Sep 30, 2026
bfb261a
refactor(harness): update litellm/harness/runtime.py
ishaan-berri Sep 30, 2026
a3edb9d
refactor(harness): update litellm/harness/sandbox/snapshot.py
ishaan-berri Sep 30, 2026
41c37af
refactor(harness): update litellm/llms/base_llm/harness/transformatio…
ishaan-berri Sep 30, 2026
ed6aeff
refactor(harness): update litellm/llms/base_llm/harness/utils.py
ishaan-berri Sep 30, 2026
49a43d7
refactor(harness): update litellm/llms/claude_code/harness/transforma…
ishaan-berri Sep 30, 2026
e3251f5
refactor(harness): update litellm/llms/codex/harness/transformation.py
ishaan-berri Sep 30, 2026
bb40b65
refactor(harness): update litellm/llms/deepagents/harness/sandbox_bac…
ishaan-berri Sep 30, 2026
1c1f22f
refactor(harness): update litellm/llms/deepagents/harness/transformat…
ishaan-berri Sep 30, 2026
290a085
refactor(harness): update litellm/llms/opencode/harness/transformatio…
ishaan-berri Sep 30, 2026
6f5a882
refactor(harness): update litellm/sandbox/__init__.py
ishaan-berri Sep 30, 2026
59cc90a
refactor(harness): update tests/unit/llms/claude_code/harness/test_tr…
ishaan-berri Sep 30, 2026
c2cf4ed
refactor(harness): update tests/unit/llms/deepagents/harness/test_san…
ishaan-berri Sep 30, 2026
e331536
refactor(harness): update tests/unit/llms/opencode/harness/test_trans…
ishaan-berri Sep 30, 2026
998c9eb
refactor(harness): update litellm/llms/base_llm/harness/utils.py
ishaan-berri Oct 1, 2026
c3dad94
refactor(harness): update litellm/llms/codex/harness/transformation.py
ishaan-berri Oct 1, 2026
318d616
refactor(harness): update tests/code_coverage_tests/recursive_detecto…
ishaan-berri Oct 1, 2026
6626486
refactor(harness): update tests/unit/llms/base_llm/harness/__init__.py
ishaan-berri Oct 1, 2026
0b71429
refactor(harness): update tests/unit/llms/claude_code/harness/fixture…
ishaan-berri Oct 1, 2026
706fc50
refactor(harness): update tests/unit/llms/codex/harness/fixtures/__in…
ishaan-berri Oct 1, 2026
bfcfe9a
refactor(harness): update tests/unit/llms/opencode/harness/fixtures/_…
ishaan-berri Oct 1, 2026
175bc37
refactor(harness): update litellm/harness/__init__.py
ishaan-berri Oct 1, 2026
0c497d4
refactor(harness): update litellm/harness/context.py
ishaan-berri Oct 1, 2026
f64b07f
refactor(harness): update litellm/harness/endpoint.py
ishaan-berri Oct 1, 2026
317d016
refactor(harness): update litellm/harness/handlers/__init__.py
ishaan-berri Oct 1, 2026
c4cd299
refactor(harness): update litellm/harness/handlers/base.py
ishaan-berri Oct 1, 2026
135dfb8
refactor(harness): update litellm/harness/handlers/cli_handler.py
ishaan-berri Oct 1, 2026
1d0de0e
refactor(harness): update litellm/harness/handlers/deepagents_handler.py
ishaan-berri Oct 1, 2026
3ad445a
refactor(harness): update litellm/harness/runtime.py
ishaan-berri Oct 1, 2026
c49defe
refactor(harness): update litellm/harness/sandbox/__init__.py
ishaan-berri Oct 1, 2026
7b975fb
refactor(harness): update litellm/harness/sandbox/base.py
ishaan-berri Oct 1, 2026
01fe9ad
refactor(harness): update litellm/harness/sandbox/docker.py
ishaan-berri Oct 1, 2026
37e0ed2
refactor(harness): update litellm/harness/sandbox/local.py
ishaan-berri Oct 1, 2026
228aa46
refactor(harness): update litellm/harness/sandbox/snapshot.py
ishaan-berri Oct 1, 2026
0969933
refactor(harness): update litellm/harness/sync.py
ishaan-berri Oct 1, 2026
3df0faf
refactor(harness): update litellm/harness/types.py
ishaan-berri Oct 1, 2026
2e0a096
refactor(harness): update litellm/llms/base_llm/harness/transformatio…
ishaan-berri Oct 1, 2026
ee192dd
refactor(harness): update litellm/llms/base_llm/harness/utils.py
ishaan-berri Oct 1, 2026
7c46422
refactor(harness): update litellm/llms/claude_code/harness/transforma…
ishaan-berri Oct 1, 2026
59c6ccb
refactor(harness): update litellm/llms/codex/harness/transformation.py
ishaan-berri Oct 1, 2026
7c04c82
refactor(harness): update litellm/llms/deepagents/harness/sandbox_bac…
ishaan-berri Oct 1, 2026
f6b9329
refactor(harness): update litellm/llms/deepagents/harness/transformat…
ishaan-berri Oct 1, 2026
d6c14f2
refactor(harness): update litellm/llms/opencode/harness/transformatio…
ishaan-berri Oct 1, 2026
4b375da
refactor(harness): update litellm/types/llms/custom_http.py
ishaan-berri Oct 1, 2026
8e8f811
refactor(harness): update tests/unit/harness/test_endpoint.py
ishaan-berri Oct 1, 2026
72b01c3
refactor(harness): update litellm/harness/runtime.py
ishaan-berri Oct 1, 2026
99ddf04
refactor(harness): update litellm/llms/deepagents/harness/sandbox_bac…
ishaan-berri Oct 1, 2026
a07d1a7
refactor(harness): update tests/unit/harness/test_init.py
ishaan-berri Oct 1, 2026
66942ac
refactor(harness): update tests/unit/harness/test_runtime.py
ishaan-berri Oct 1, 2026
d31d713
refactor(harness): update tests/unit/llms/deepagents/harness/test_san…
ishaan-berri Oct 1, 2026
2e7678e
ci: run tests/unit/harness in the misc unit shard
ishaan-berri Oct 1, 2026
1f93613
refactor(harness): update litellm/harness/runtime.py
ishaan-berri Oct 1, 2026
68367fb
refactor(harness): update litellm/harness/sync.py
ishaan-berri Oct 1, 2026
80a4567
refactor(harness): update litellm/llms/deepagents/harness/sandbox_bac…
ishaan-berri Oct 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/scripts/unit_selection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ legacy_paths() {
echo tests/unit/embeddings
echo tests/unit/endpoints
echo tests/unit/files
echo tests/unit/harness
echo tests/unit/images
echo tests/unit/interactions
echo tests/unit/messages
Expand Down
8 changes: 8 additions & 0 deletions .github/ci-coverage-allowlist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ description: >-
by a job nor listed here, so every entry below is a decision on the record.

test_paths:
- reason: >-
litellm.agent() end-to-end suite. It drives the real claude, codex and opencode CLIs and
deepagents against a live LiteLLM AI Gateway, so it needs those binaries on PATH plus
LITELLM_PROXY_API_BASE / LITELLM_PROXY_API_KEY, and skips without them. Run manually
before changing litellm/harness; the mocked coverage runs in tests/unit/harness and
tests/unit/llms/*/harness
paths:
- tests/harness_e2e
- reason: >-
The Rust/Python parity harness is run manually through its local CLI. Recorded replay,
fixture generation, and harness checks are intentionally outside pull request CI
Expand Down
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,31 @@ For MCP OAuth, an upstream may advertise dynamic client registration but refuse

</details>

<details>
<summary><b>Agents</b> - Run Claude Code, Codex, OpenCode or Deep Agents on any model (Python SDK)</summary>

### Python SDK - Agents

```python
import litellm
from litellm import Harness, sandbox

result = litellm.agent(
Harness.CLAUDE_CODE, # or Harness.CODEX, Harness.OPENCODE, Harness.DEEPAGENTS
"Find why tests/test_router.py is flaky and fix it.",
sandbox=sandbox.local("./repo"),
model="litellm_proxy/claude-sonnet-4-5", # a model group on your AI Gateway
)

print(result.text, result.cost, [f.path for f in result.files])
```

Set `LITELLM_PROXY_API_BASE` and `LITELLM_PROXY_API_KEY` and every model call the agent makes goes through your AI Gateway, tagged `harness,claude_code`. Drop the `litellm_proxy/` prefix to call a provider directly. Install `starlette uvicorn` plus the agent's CLI (`claude`, `codex` or `opencode`), or `deepagents langchain-litellm` for Deep Agents.

[**Docs: Agent Harnesses**](https://docs.litellm.ai/docs/harness)

</details>

### Supported Providers ([Website Supported Models](https://models.litellm.ai/) | [Docs](https://docs.litellm.ai/docs/providers))

| Provider | `/chat/completions` | `/messages` | `/responses` | `/embeddings` | `/image/generations` | `/audio/transcriptions` | `/audio/speech` | `/moderations` | `/batches` | `/rerank` |
Expand Down
25 changes: 25 additions & 0 deletions litellm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2281,6 +2281,24 @@ def set_global_gitlab_config(config: Dict[str, Any]) -> None:
# Track if async client cleanup has been registered (for lazy loading)
_async_client_cleanup_registered = False

# litellm.agent() entrypoints, resolved lazily from litellm.harness by __getattr__.
_AGENT_EXPORTS: Final = frozenset(
{
"agent",
"aagent",
"agent_session",
"aagent_session",
"agent_resume",
"aagent_resume",
"agent_capabilities",
"Harness",
"ClaudeCodeOptions",
"CodexOptions",
"OpenCodeOptions",
"DeepAgentsOptions",
}
)

# Eager loading for backwards compatibility with VCR and other HTTP recording tools
# When LITELLM_DISABLE_LAZY_LOADING is set, lazy-loaded attributes are loaded at import time
# For now, this only affects encoding (tiktoken) as it was the only reported issue
Expand Down Expand Up @@ -2314,6 +2332,13 @@ def __getattr__(name: str) -> Any:
handler_func: Final = registry[name]
return handler_func(name)

# litellm.agent() and friends: imported on first access (not needed for completion calls)
if name == "harness" or name in _AGENT_EXPORTS:
import importlib

harness_module = importlib.import_module("litellm.harness")
return harness_module if name == "harness" else getattr(harness_module, name)

# Lazy load encoding from main.py to avoid heavy tiktoken import
if name == "encoding":
from ._lazy_imports import get_litellm_globals
Expand Down
23 changes: 23 additions & 0 deletions litellm/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2184,3 +2184,26 @@

# API endpoint for breached password k-anonymity search
HIBP_RANGE_API_BASE: Final = "https://api.pwnedpasswords.com/range"

# litellm.harness defaults
HARNESS_ENDPOINT_HOST: Final = "127.0.0.1"
HARNESS_ENDPOINT_STARTUP_TIMEOUT_SECONDS: Final = 10.0
HARNESS_ENDPOINT_REQUEST_TIMEOUT_SECONDS: Final = 600.0
HARNESS_SESSION_TOKEN_BYTES: Final = 32
HARNESS_MAX_DIFF_BYTES: Final = 256 * 1024
HARNESS_STDERR_TAIL_LINES: Final = 40
HARNESS_STREAM_READ_CHUNK_BYTES: Final = 64 * 1024
HARNESS_EVENT_QUEUE_MAX_SIZE: Final = 1024
HARNESS_PROCESS_KILL_GRACE_SECONDS: Final = 5.0
HARNESS_SNAPSHOT_SKIP_DIRS: Final = frozenset(
{
".git",
"node_modules",
".venv",
"venv",
"__pycache__",
".mypy_cache",
".pytest_cache",
".ruff_cache",
}
)
98 changes: 98 additions & 0 deletions litellm/harness/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
"""Agent harnesses: run Claude Code, Codex, OpenCode or Deep Agents on any LiteLLM model.

The entrypoints live on the top-level package:

import litellm
from litellm import Harness, sandbox

result = litellm.agent(
Harness.CLAUDE_CODE,
"fix the failing test",
sandbox=sandbox.local("."),
model="litellm_proxy/claude-sonnet-4-5", # a model group on your AI Gateway
)

This module holds the types you get back: events, Result, State, errors.
"""

from litellm.harness.errors import (
CapabilityUnsupported,
HarnessError,
HarnessInstallFailed,
OptionsMismatch,
OutputInvalid,
SandboxError,
SessionClosed,
StateIncompatible,
)
from litellm.harness.options import (
ClaudeCodeOptions,
CodexOptions,
DeepAgentsOptions,
OpenCodeOptions,
)
from litellm.harness.runtime import (
AsyncEventStream,
AsyncSession,
aagent,
aagent_resume,
aagent_session,
agent_capabilities,
)
from litellm.harness.sync import EventStream, Session, agent, agent_resume, agent_session
from litellm.harness.types import (
Approval,
Capabilities,
Compaction,
Done,
Event,
FileChange,
Harness,
Reasoning,
Result,
State,
Text,
ToolCall,
ToolResult,
Usage,
)

__all__ = (
"Approval",
"AsyncEventStream",
"AsyncSession",
"Capabilities",
"CapabilityUnsupported",
"ClaudeCodeOptions",
"CodexOptions",
"Compaction",
"DeepAgentsOptions",
"Done",
"Event",
"EventStream",
"FileChange",
"Harness",
"HarnessError",
"HarnessInstallFailed",
"OpenCodeOptions",
"OptionsMismatch",
"OutputInvalid",
"Reasoning",
"Result",
"SandboxError",
"Session",
"SessionClosed",
"State",
"StateIncompatible",
"Text",
"ToolCall",
"ToolResult",
"Usage",
"aagent",
"aagent_resume",
"aagent_session",
"agent",
"agent_capabilities",
"agent_resume",
"agent_session",
)
62 changes: 62 additions & 0 deletions litellm/harness/context.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
"""Per-session state shared by the runtime, handlers and harness configs."""

from __future__ import annotations

from collections.abc import Awaitable, Callable, Mapping, Sequence
from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Any, TypeAlias

from pydantic import BaseModel

from litellm.harness.options import HarnessOptions
from litellm.harness.sandbox.base import Sandbox
from litellm.harness.types import Approval, Harness, PermissionMode

if TYPE_CHECKING:
from litellm.harness.endpoint import ModelEndpoint

ApprovalHandler: TypeAlias = Callable[
[Approval], bool | Awaitable[bool] # mutable-ok: Callable parameter list in a type alias, not a runtime collection
]


@dataclass(frozen=True)
class GatewayTarget:
"""Resolved LiteLLM AI Gateway for `litellm_proxy/` models. Internal, not exported."""

api_base: str
api_key: str


@dataclass
class SessionContext:
"""Everything a handler and config need for a session. Owned by the runtime."""

harness: Harness
sandbox: Sandbox
session_id: str
# Model name as sent to the runtime (litellm_proxy/ prefix already stripped).
model: str | None = None
gateway: GatewayTarget | None = None
api_key: str | None = None
api_base: str | None = None
endpoint: ModelEndpoint | None = None
instructions: str | None = None
tools: Sequence[Callable[..., Any]] = ()
skills: Sequence[str] = ()
disable_tools: Sequence[str] = ()
permissions: PermissionMode = "full"
on_approval: ApprovalHandler | None = None
output: type[BaseModel] | None = None
max_turns: int | None = None
timeout: float | None = None
metadata: Mapping[str, Any] = field(default_factory=dict)
options: HarnessOptions | None = None
# Set by the handler after each turn.
final_text: str = ""
output_json: str | None = None
# Usage for in-process harnesses that call LiteLLM directly (no model endpoint).
input_tokens: int = 0
output_tokens: int = 0
cost: float = 0.0
calls: int = 0
Loading
Loading