Commit Graph

41 Commits

Author SHA1 Message Date
Xingyao Wang
4405b109e3 Fix issue #4809: [Bug]: Model does not support image upload when usin… (#4810)
Co-authored-by: openhands <openhands@all-hands.dev>
2024-11-07 02:28:16 +00:00
Xingyao Wang
24117143ae feat(llm): add new haiku into func calling support model (#4738) 2024-11-04 22:38:00 +00:00
Robert Brennan
250fcbe62c Various async fixes (#4722) 2024-11-04 10:08:09 -05:00
Xingyao Wang
1747b3d6b2 fix: prompt caching (#4704) 2024-11-02 07:21:21 -04:00
Engel Nyst
bde978cf0f Fix Openrouter (#4641) 2024-10-30 18:31:24 +00:00
Xingyao Wang
2587220b12 fix(llm): fallback when model is out of function calling supported list (#4617)
Co-authored-by: openhands <openhands@all-hands.dev>
2024-10-31 01:54:50 +08:00
OpenHands
866ba6e3b2 Fix issue #4629: [Bug]: Replace claude-3-5-sonnet-20240620 with claude-3-5-sonnet-20241022 (#4631)
Co-authored-by: Graham Neubig <neubig@gmail.com>
2024-10-30 17:16:04 +00:00
Robert Brennan
572b3ad682 safer model info access (#4619) 2024-10-29 17:44:51 -04:00
Robert Brennan
30eeaa641c Major logging overhaul (#4563) 2024-10-29 07:30:50 +01:00
Xingyao Wang
ae13171194 feat(agent): CodeAct with function calling (#4537)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: tobitege <10787084+tobitege@users.noreply.github.com>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Co-authored-by: tofarr <tofarr@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-29 11:06:33 +08:00
Xingyao Wang
7340b78962 feat(eval): rewrite log_completions to save completions to directory (#4566) 2024-10-25 16:36:11 +00:00
Xingyao Wang
dcd4b04f57 feat(llm): update prompt caching list to include new sonnet (#4552) 2024-10-25 20:36:35 +08:00
Xingyao Wang
da548d308c [agent] LLM-based editing (#3985)
Co-authored-by: Tim O'Farrell <tofarr@gmail.com>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Co-authored-by: Robert Brennan <accounts@rbren.io>
Co-authored-by: Graham Neubig <neubig@gmail.com>
2024-10-22 04:51:44 +08:00
Graham Neubig
b660aa99b8 Fix issue #4480: '[Bug]: Being blocked by cloudflare results in futile retries (#4482)
Co-authored-by: openhands <openhands@all-hands.dev>
2024-10-18 13:04:34 -04:00
Engel Nyst
caa77cf7a6 Log cache hit/miss for deepseek (#4343) 2024-10-11 18:43:43 +02:00
tofarr
cdd05a98db Lockup Resiliency and Asyncio Improvements (#4221) 2024-10-08 07:17:37 -06:00
Engel Nyst
8c32ef2234 Fix to use async variant of completion (#4228) 2024-10-06 05:10:36 +02:00
Engel Nyst
1abfd3b808 Retry on litellm's APIError, which includes 502 (#4167) 2024-10-03 01:54:49 +02:00
tofarr
4eaf28d7b1 Fix ctrl c not working during startup (#4155) 2024-10-02 11:05:00 +08:00
Engel Nyst
e582806004 Vision and prompt caching fixes (#4014) 2024-09-28 14:37:29 +02:00
Engel Nyst
0a03c802f5 Refactor llm.py (#4057) 2024-09-26 17:44:18 +00:00
Engel Nyst
798aaeaef6 remove Exception in the agent (#4054) 2024-09-26 06:39:17 +02:00
Xingyao Wang
8ea2d61ff2 [llm] Add app name for OpenRouter (#4010) 2024-09-24 00:26:07 +02:00
Graham Neubig
73ded7de10 Make drop_params default in llm_config (#4012) 2024-09-23 16:57:10 -04:00
Xingyao Wang
714e46f29a [eval] save eventstream & llm completions for SWE-Bench run_infer (#3923) 2024-09-22 04:39:13 +00:00
tobitege
01462e11d7 (fix) CodeActAgent/LLM: react on should_exit flag (user cancellation) (#3968) 2024-09-20 23:49:45 +02:00
Engel Nyst
8fdfece059 Refactor messages serialization (#3832)
Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-09-18 23:48:58 +02:00
tofarr
ad0b549d8b Feat Tightening up Timeouts and interrupt conditions. (#3926) 2024-09-18 20:50:42 +00:00
Engel Nyst
47f60b8275 Don't send gemini settings when the llm is not gemini (#3940) 2024-09-18 20:12:58 +00:00
tobitege
b4408b41c9 (feat) LLM class: add safety_settings for Gemini; improve max_output_tokens defaulting (#3925) 2024-09-18 11:51:23 -04:00
Cole Murray
97a03faf33 Add Handling of Cache Prompt When Formatting Messages (#3773)
* Add Handling of Cache Prompt When Formatting Messages

* Fix Value for Cache Control

* Fix Value for Cache Control

* Update openhands/core/message.py

Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>

* Fix lint error

* Serialize Messages if Propt Caching Is Enabled

* Remove formatting message change

---------

Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Co-authored-by: tobitege <10787084+tobitege@users.noreply.github.com>
2024-09-10 16:34:41 +00:00
tobitege
5ffff742de Regression fixes: LLM logging; client readiness (EventStreamRuntime) (#3776)
* Regression fixes: LLM logging; client readiness (EventStreamRuntime)

* fix llm.async_completion_wrapper bad edit in previous commit

* regen couple of mock files

* client: always log initialized status
2024-09-09 21:02:43 +02:00
Cole Murray
dadada18ce Add Anthropic Models to Cache Prompt (#3775)
* Add Anthropic Models to Cache Prompt

* Update Cache Prompt Active Check for Partial String Matching
2024-09-08 22:09:14 +00:00
tobitege
57187417b7 revert enabling litellm verbose mode from testing (#3750) 2024-09-05 20:12:04 +00:00
tobitege
03b5b03bb2 (enh) CodeActAgent: improve logging; sensible retry defaults in config (#3729)
* CodeActAgent: improve logging; sensible retry defaults for completion errors

* CodeActAgent: reduce completion error message sent to UI

* tweak values; docs+config template changes

* fix format_messages; log exception in codeactagent again
2024-09-05 18:14:15 +00:00
niliy01
82a154f7e7 (feat) making prompt caching optional instead of enabled default (#3689)
* (feat) making prompt caching optional instead of enabled default

At present, only the Claude models support prompt caching as a experimental feature, therefore, this feature should be implemented as an optional setting rather than being enabled by default.

Signed-off-by: Yi Lin <teroincn@gmail.com>

* handle the conflict

* fix unittest mock return value

* fix lint error in whitespace

---------

Signed-off-by: Yi Lin <teroincn@gmail.com>
2024-09-05 18:52:26 +02:00
tobitege
bc31fb15fe (fix) CodeActAgent: fix issues with vision support in prompts (#3665)
* CodeActAgent: fix message prep if prompt caching is not supported

* fix python version in regen tests workflow

* fix in conftest "mock_completion" method

* add disable_vision to LLMConfig; revert change in message parsing in llm.py

* format messages in several files for completion

* refactored message(s) formatting (llm.py); added vision_is_active()

* fix a unit test

* regenerate: added LOG_TO_FILE and FORCE_REGENERATE env flags

* try to fix path to logs folder in workflow

* llm: prevent index error

* try FORCE_USE_LLM in regenerate

* tweaks everywhere...

* fix 2 random unit test errors :(

* added FORCE_REGENERATE_TESTS=true to regenerate CLI

* fix test_lint_file_fail_typescript again

* double-quotes for env vars in workflow; llm logger set to debug

* fix typo in regenerate

* regenerate iterations now 20; applied iteration counter fix by Li

* regenerate: pass FORCE_REGENERATE flag into env

* fixes for int tests. several mock files updated.

* browsing_agent: fix response_parser.py adding ) to empty response

* test_browse_internet: fix skipif and revert obsolete mock files

* regenerate: fi bracketing for http server start/kill conditions

* disable test_browse_internet for CodeAct*Agents; mock files updated after merge

* missed to include more mock files earlier

* reverts after review feedback from Li

* forgot one

* browsing agent test, partial fixes and updated mock files

* test_browse_internet works in my WSL now!

* adapt unit test test_prompt_caching.py

* add DEBUG to regenerate workflow command

* convert regenerate workflow params to inputs

* more integration test mock files updated

* more files

* test_prompt_caching: restored test_prompt_caching_headers purpose

* file_ops: fix potential exception, like "cross device copy"; fixed mock files accordingly

* reverts/changes wrt feedback from xingyao

* updated docs and config template

* code cleanup wrt review feedback
2024-09-04 17:58:30 +02:00
Shubham raj
2bc3e8d584 Fix: llm completion exception breaks CodeActAgent (#3678)
* Catch exception and return finish action with an exception message in case of exception in llm completion

* Remove exception logs

* Raise llm response error for any exception in llm completion

* Raise LLMResponseError from async completion and async streaming completion as well
2024-09-04 05:51:49 +02:00
tobitege
c83fab8a00 llm: add NotFoundError to completion exception handling (#3668)
Co-authored-by: tofarr <tofarr@gmail.com>
2024-09-01 07:47:21 +00:00
Kaushik Deka
5bb931e4d6 Add prompt caching (Sonnet, Haiku only) (#3411)
* Add prompt caching

* remove anthropic-version from extra_headers

* change supports_prompt_caching method to attribute

* change caching strat and log cache statistics

* add reminder as a new message to fix caching

* fix unit test

* append reminder to the end of the last message content

* move token logs to post completion function

* fix unit test failure

* fix reminder and prompt caching

* unit tests for prompt caching

* add test

* clean up tests

* separate reminder, use latest two messages

* fix tests

---------

Co-authored-by: tobitege <10787084+tobitege@users.noreply.github.com>
Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
2024-08-26 20:46:44 -04:00
Robert Brennan
01ae22ef57 Rename OpenDevin to OpenHands (#3472)
* Replace OpenDevin with OpenHands

* Update CONTRIBUTING.md

* Update README.md

* Update README.md

* update poetry lock; move opendevin folder to openhands

* fix env var

* revert image references in docs

* revert permissions

* revert permissions

---------

Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
2024-08-20 00:44:54 +08:00