Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "cooperbench"
description = "Multi-agent coordination benchmark for collaborative code generation"
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.12"
requires-python = ">=3.10"
dynamic = ["version"]
authors = [
{name = "Arpandeep Khatua"},
Expand Down Expand Up @@ -35,6 +35,8 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
Expand Down Expand Up @@ -71,7 +73,6 @@ dependencies = [
"binaryornot>=0.4.4",
"cachetools",
"libtmux>=0.53.0",
"browser-use>=0.8.0",
"func-timeout>=4.3.5",
"tom-swe>=1.0.3",
]
Expand Down Expand Up @@ -132,7 +133,7 @@ packages = ["src/cooperbench"]

[tool.ruff]
line-length = 120
target-version = "py312"
target-version = "py310"
exclude = [
"src/cooperbench/agents/swe_agent/", # third-party code
"src/cooperbench/agents/openhands_agent_sdk/", # adapted from OpenHands SDK
Expand All @@ -154,7 +155,7 @@ ignore = [
known-first-party = ["cooperbench"]

[tool.mypy]
python_version = "3.12"
python_version = "3.10"
ignore_missing_imports = true
check_untyped_defs = false
disallow_untyped_defs = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from cooperbench.agents.mini_swe_agent_v2.models import GLOBAL_MODEL_STATS
from cooperbench.agents.mini_swe_agent_v2.models.utils.actions_toolcall import (
BASH_TOOL,
SEND_MESSAGE_TOOL,
format_toolcall_observation_messages,
parse_toolcall_actions,
)
Expand Down Expand Up @@ -47,7 +46,7 @@ class LitellmModelConfig(BaseModel):


class LitellmModel:
abort_exceptions: list[type[Exception]] = [
abort_exceptions: list[type[BaseException]] = [
litellm.exceptions.UnsupportedParamsError,
litellm.exceptions.NotFoundError,
litellm.exceptions.PermissionDeniedError,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from collections.abc import Mapping
from pathlib import Path
from typing import TYPE_CHECKING, Self, overload
from typing import TYPE_CHECKING, overload

from typing_extensions import Self

from openhands.sdk.agent.base import AgentBase
from openhands.sdk.conversation.base import BaseConversation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import threading
import time
from collections import deque
from typing import Any, Self
from typing import Any

from typing_extensions import Self


class FIFOLock:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
from collections.abc import Sequence
from enum import Enum
from pathlib import Path
from typing import Any, Self
from typing import Any

from typing_extensions import Self

from pydantic import Field, PrivateAttr, model_validator

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import re
from pathlib import Path
from typing import TYPE_CHECKING, Any
from typing import TypeAlias

import frontmatter
from pydantic import BaseModel, Field, field_validator, model_validator
Expand Down Expand Up @@ -132,18 +133,18 @@ def to_plugin_source(self) -> PluginSource:
#: MCP server configuration dict. Keys are server names, values are server configs.
#: Each config should have 'command' (str), optional 'args' (list[str]), 'env'.
#: See https://gofastmcp.com/clients/client#configuration-format
type McpServersDict = dict[str, dict[str, Any]]
McpServersDict: TypeAlias = dict[str, dict[str, Any]]

#: LSP server configuration dict. Keys are server names, values are server configs.
#: Each server config should have 'command' (str) and optional 'args' (list[str]),
#: 'extensionToLanguage' (dict mapping file extensions to language IDs).
#: See https://github.com/OpenHands/software-agent-sdk/issues/1745 for LSP support.
type LspServersDict = dict[str, dict[str, Any]]
LspServersDict: TypeAlias = dict[str, dict[str, Any]]

#: Hooks configuration dict matching HookConfig.to_dict() structure.
#: Should have 'hooks' key with event types mapping to list of matchers.
#: See openhands.sdk.hooks.HookConfig for the full structure.
type HooksConfigDict = dict[str, Any]
HooksConfigDict: TypeAlias = dict[str, Any]


if TYPE_CHECKING:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from collections.abc import Sequence
from typing import TYPE_CHECKING, Self
from typing import TYPE_CHECKING

from typing_extensions import Self

from pydantic import Field
from rich.text import Text
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from collections.abc import Sequence
from typing import TYPE_CHECKING, Self
from typing import TYPE_CHECKING

from typing_extensions import Self

from pydantic import Field
from rich.text import Text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


if TYPE_CHECKING:
from typing import Self
from typing_extensions import Self

S = TypeVar("S", bound="Schema")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
import logging
import threading
from abc import ABC
from typing import Annotated, Any, Self, Union
from typing import Annotated, Any, Union

from typing_extensions import Self

from pydantic import (
BaseModel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "openhands-sdk"
version = "1.10.0"
description = "OpenHands SDK - Core functionality for building AI agents"

requires-python = ">=3.12"
requires-python = ">=3.10"
dependencies = [
"deprecation>=2.1.0",
"fastmcp>=2.11.3",
Expand All @@ -14,6 +14,7 @@ dependencies = [
"python-frontmatter>=1.1.0",
"python-json-logger>=3.3.0",
"tenacity>=9.1.2",
"typing_extensions>=4.0",
"websockets>=12",
"lmnr>=0.7.24",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import hashlib
from collections.abc import Sequence
from pathlib import Path
from typing import TYPE_CHECKING, Literal, Self
from typing import TYPE_CHECKING, Literal

from typing_extensions import Self

from pydantic import Field

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"""

from collections.abc import Sequence
from typing import TYPE_CHECKING, Any, override
from typing import TYPE_CHECKING, Any

from typing_extensions import override

from pydantic import Field

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name = "openhands-tools"
version = "1.10.0"
description = "OpenHands Tools - Runtime tools for AI agents"

requires-python = ">=3.12"
requires-python = ">=3.10"
dependencies = [
"openhands-sdk",
"bashlex>=0.18",
"binaryornot>=0.4.4",
"cachetools",
"libtmux>=0.53.0",
"pydantic>=2.11.7",
"browser-use>=0.8.0",
"typing_extensions>=4.0",
"func-timeout>=4.3.5",
"tom-swe>=1.0.3",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ name = "openhands-workspace"
version = "1.10.0"
description = "OpenHands Workspace - Docker and container-based workspace implementations"

requires-python = ">=3.12"
requires-python = ">=3.10"
dependencies = [
"openhands-sdk",
"openhands-agent-server",
"pydantic>=2.11.7",
]

Expand Down
4 changes: 3 additions & 1 deletion src/cooperbench/agents/swe_agent/agent/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
import re
import time
from pathlib import Path, PurePosixPath
from typing import Annotated, Any, Literal, Self
from typing import Annotated, Any, Literal

from typing_extensions import Self

import yaml
from jinja2 import Template
Expand Down
4 changes: 3 additions & 1 deletion src/cooperbench/agents/swe_agent/environment/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
import os
import shlex
from pathlib import Path
from typing import Any, Literal, Protocol, Self
from typing import Any, Literal, Protocol

from typing_extensions import Self

from git import InvalidGitRepositoryError
from git import Repo as GitRepo
Expand Down
4 changes: 3 additions & 1 deletion src/cooperbench/agents/swe_agent/environment/swe_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
import logging
import shlex
from pathlib import PurePath
from typing import Literal, Self
from typing import Literal

from typing_extensions import Self

from pydantic import BaseModel, ConfigDict, Field
from swerex.deployment.abstract import AbstractDeployment
Expand Down
4 changes: 3 additions & 1 deletion src/cooperbench/agents/swe_agent/tooling/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
import re
from functools import cached_property
from pathlib import Path
from typing import Any, Self
from typing import Any

from typing_extensions import Self

from pydantic import BaseModel, Field
from swerex.runtime.abstract import Command as RexCommand
Expand Down
Loading
Loading