Commit Graph

1808 Commits

Author SHA1 Message Date
openhands
475e96c314 Fix circular import error between enterprise and core modules
- Move ApiKeyStore import to lazy loading in enterprise/server/mcp/mcp_config.py
- Implement lazy import mechanism in enterprise/storage/stored_conversation_metadata.py using __getattr__
- Move UserContext import to TYPE_CHECKING block in openhands/app_server/app_conversation/sql_app_conversation_info_service.py

This resolves the circular import chain:
user_context → user_models → provider → events → stream → io → json → llm → config → mcp_config → server.mcp.mcp_config → storage → stored_conversation_metadata → sql_app_conversation_info_service → user_context

Co-authored-by: openhands <openhands@all-hands.dev>
2025-12-10 02:41:27 +00:00
openhands
63086831cb Fix circular import in openhands.events.serialization.event
The circular import was caused by openhands.events.serialization.event
importing openhands.llm.metrics at module level, which eventually led
back to openhands.events through the config system.

Changes:
- Remove module-level import of openhands.llm.metrics classes
- Add lazy import in event_from_dict function where metrics are used
- Preserve all existing functionality while breaking the import cycle

This fixes the second circular import in the chain:
events.serialization.event → llm.metrics → config → storage → events

Co-authored-by: openhands <openhands@all-hands.dev>
2025-12-10 02:05:49 +00:00
openhands
0d163bf1ce Fix circular import in openhands.events.event
The circular import was caused by openhands.events.event importing
openhands.llm.metrics at module level, which eventually led back to
openhands.events.event through the config system.

Changes:
- Move Metrics import to TYPE_CHECKING block for type annotations
- Add lazy import in llm_metrics property getter for runtime usage
- Use forward references in type annotations
- Preserve all existing functionality while breaking the import cycle

Fixes the ImportError: cannot import name 'Event' from partially
initialized module 'openhands.events.event' error.

Co-authored-by: openhands <openhands@all-hands.dev>
2025-12-10 01:41:23 +00:00
openhands
6649be08a7 Fix circular import issue by extracting RecallType to standalone module
- Created new module openhands/events/recall_type.py with RecallType enum
- Removed RecallType from openhands/events/event.py to break circular dependency
- Updated all import statements across 13 files to use new module path
- Resolves circular import chain: sync/enrich_user_interaction_data.py ->
  integrations.github.data_collector -> ... -> openhands.events.event ->
  openhands.llm.metrics -> ... -> storage.conversation_callback ->
  openhands.events.observation.agent -> openhands.events.event (circular)

The RecallType enum now has minimal dependencies and can be imported
without triggering the heavy dependency chain that caused the circular import.

Co-authored-by: openhands <openhands@all-hands.dev>
2025-12-10 00:46:31 +00:00
Chuck Butkus
ee0c1a1c2f Revert "Fix circular reference"
This reverts commit a2d61e0eb6.
2025-12-09 19:34:14 -05:00
Chuck Butkus
a2d61e0eb6 Fix circular reference 2025-12-09 19:00:48 -05:00
Chuck Butkus
a8c4fc5318 Fix SQL migration to work with both SQLLite and Postgres 2025-12-09 18:30:58 -05:00
chuckbutkus
1864cf9b7a Merge branch 'main' into migrate-org-db-litellm-from-deploy 2025-12-09 12:26:32 -05:00
Vasco Schiavo
df92923959 Refactor return statement to simplify get_supported_llm_models method (#11947) 2025-12-09 16:27:49 +00:00
chuckbutkus
297140e727 Merge branch 'main' into migrate-org-db-litellm-from-deploy 2025-12-08 13:38:55 -05:00
Tim O'Farrell
db64abc580 Refactor webhook endpoints to use session API key authentication (#11926)
Co-authored-by: openhands <openhands@all-hands.dev>
2025-12-08 07:40:01 -07:00
Cesar Garcia
584517edec docs: fix broken architecture diagram link in openhands/README.md (#11924)
Co-authored-by: Engel Nyst <engel.nyst@gmail.com>
2025-12-07 22:15:58 +00:00
Hiep Le
d7b36c9579 fix: switching from own model to breaks functionality (#11916) 2025-12-06 11:21:18 +07:00
Tim O'Farrell
72c7d9c497 APP-216 Support multiple git providers in conversation secrets (#11908)
Co-authored-by: openhands <openhands@all-hands.dev>
2025-12-05 11:50:45 -07:00
Chuck Butkus
1d3ed8f6fa Merge branch 'main' into migrate-org-db-litellm-from-deploy 2025-12-04 14:35:48 -05:00
Hiep Le
59ca8bd9a8 refactor: derive deterministic key id from secret itself (#11905) 2025-12-05 01:41:32 +07:00
Tim O'Farrell
3a9aa90c3a Bumped SDK to V1.4.1 (#11903) 2025-12-04 17:52:27 +00:00
Chuck Butkus
517a8c3d9b Merge branch 'main' into migrate-org-db-litellm-from-deploy 2025-12-03 23:01:30 -05:00
Hiep Le
d0496fea8c chore: update sdk to latest version (#11897)
Co-authored-by: Tim O'Farrell <tofarr@gmail.com>
2025-12-04 01:36:19 +07:00
Tim O'Farrell
8f91db8ec4 Replace USE_V1_CONVERSATION_API feature flag with user setting (#11893)
Co-authored-by: openhands <openhands@all-hands.dev>
2025-12-03 09:02:40 -07:00
Hiep Le
fd13c91387 fix(backend): apply user-defined condenser_max_size in new v1 conversations (#11862) 2025-12-03 00:24:25 +07:00
Hiep Le
6139e39449 fix(backend): git settings not applying in v1 conversations (#11866) 2025-12-02 21:34:37 +07:00
Hiep Le
f76ac242f0 fix(backend): conversation statistics are currently not being persisted to the database (V1). (#11837) 2025-12-02 21:22:02 +07:00
Tim O'Farrell
8f361b3698 Fix git checkout error in workspace setup (#11855)
Co-authored-by: openhands <openhands@all-hands.dev>
2025-12-01 23:01:30 +00:00
Tim O'Farrell
fd6e0cab3f Fix V1 MCP services (Fix tavily search) (#11840)
Co-authored-by: openhands <openhands@all-hands.dev>
2025-12-01 21:19:19 +00:00
sp.wack
96f13b15e7 Revert "chore(backend): Add better PostHog tracking" (#11749) 2025-12-01 13:58:03 +00:00
adshrc
991f1a242c feat(llm): added Claude Opus 4.5 model and corresponding test (#11841) 2025-12-01 11:09:33 +00:00
Marco Dalalba
6d8cca43a8 fix: add Azure GPT-5 family to stop words unsupported patterns (#11842) 2025-12-01 01:32:34 +01:00
Hiep Le
d62bb81c3b feat(backend): implement API to fetch contents of PLAN.md (#11795) 2025-11-30 13:29:13 +07:00
Hiep Le
d0b1d29379 fix(backend): the SaaS codebase is currently non-functional. (#11834) 2025-11-28 09:12:02 -07:00
Rohit Malhotra
9906a1d49a V1: Support v1 conversations in github resolver (#11773)
Co-authored-by: openhands <openhands@all-hands.dev>
2025-11-26 13:11:05 -05:00
Hiep Le
865ddaabdf fix(backend): unable to start a new V0 conversation (#11824) 2025-11-26 23:49:52 +07:00
Tim O'Farrell
d737141efa SDK Fixes (#11813)
Co-authored-by: openhands <openhands@all-hands.dev>
2025-11-26 10:44:17 +00:00
Hiep Le
b532a5e7fe fix(backend): github token not working for v1 conversations (#11814) 2025-11-26 01:04:45 +07:00
mamoodi
9cc8687271 fix: handle None return from version_info.get('Components') in docker builder (#11816)
Co-authored-by: openhands <openhands@all-hands.dev>
2025-11-25 15:35:40 +00:00
aoi127
f6e4d00df1 fix: prevent newline accumulation in XML parameter serialization (#11767)
Co-authored-by: Lai Jinyi <laijinyi@tp-link.com.cn>
2025-11-25 11:56:35 +01:00
chuckbutkus
dec0f411db Merge branch 'main' into migrate-org-db-litellm-from-deploy 2025-11-23 17:50:54 -05:00
Wan Arif
3504ca7752 feat: add Azure DevOps integration support (#11243)
Co-authored-by: Graham Neubig <neubig@gmail.com>
2025-11-22 14:00:24 -05:00
Graham Neubig
1e513ad63f feat: Add configurable stuck/loop detection (#11799)
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: chuckbutkus <chuck@all-hands.dev>
2025-11-21 22:27:38 +00:00
chuckbutkus
93edf56824 Merge branch 'main' into migrate-org-db-litellm-from-deploy 2025-11-20 21:58:01 -05:00
Tim O'Farrell
c82e183066 Fix Docker hostname issues in HTTP requests (#11787)
Co-authored-by: openhands <openhands@all-hands.dev>
2025-11-20 11:59:58 +00:00
Tim O'Farrell
ba883ffeca Feat sandbox skills (#11785) 2025-11-20 10:52:13 +00:00
chuckbutkus
8d4095e20e Merge branch 'main' into migrate-org-db-litellm-from-deploy 2025-11-19 20:46:10 -05:00
Chuck Butkus
016761471a Revert "Fix async routine to handle being in a loop already"
This reverts commit 6e61f0617a.
2025-11-19 15:59:50 -05:00
Boxuan Li
790b7c6e39 Add grok-code-fast-1 to FUNCTION_CALLING_PATTERNS (#11775)
Co-authored-by: openhands <openhands@all-hands.dev>
2025-11-19 08:38:57 -05:00
Daniel Foguelman
4c57a98660 Remove inconsistent parameters in claude sonnet (#11719) 2025-11-19 08:38:19 -05:00
Hiep Le
36cf4e161a fix(backend): ensure microagents are loaded for V1 conversations (#11772)
Co-authored-by: Engel Nyst <engel.nyst@gmail.com>
2025-11-19 18:54:08 +07:00
Chuck Butkus
6e61f0617a Fix async routine to handle being in a loop already 2025-11-19 01:26:39 -05:00
Engel Nyst
bede37fdb6 feat: Enable native tool calling for gemini-3-pro-preview (#11774) 2025-11-18 23:29:54 +01:00
Chuck Butkus
a89d66f934 Merge main into branch 2025-11-18 14:24:00 -05:00