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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Application Frameworks",
]
license = { file = "LICENSE" }
dependencies = ["numpy~=2.3", "haiway~=0.38.1"]
dependencies = ["numpy~=2.3", "haiway~=0.39.1"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

haiway 0.39.1 PyPI release version

💡 Result:

Haiway 0.39.1 is not on PyPI — the latest release on PyPI is 0.38.1 (uploaded Nov 17, 2025). [1]

Sources:
[1] haiway PyPI project page.


haiway 0.39.1 does not exist on PyPI—installation will fail.

Verification confirms that haiway 0.39.1 is not available on PyPI. The latest release is version 0.38.1 (uploaded November 17, 2025). The dependency specification haiway~=0.39.1 will cause installation failures. Either adjust the version to 0.38.1 or confirm that 0.39.1 will be released before this PR merges.

🤖 Prompt for AI Agents
In pyproject.toml around line 27, the dependency entry `haiway~=0.39.1`
references a non-existent PyPI release and will break installs; update the
requirement to a published version (e.g., `haiway~=0.38.1`) or change to a
permissive spec (e.g., `haiway>=0.38.1,<0.40.0`) if you intend to accept future
0.39.x when released, then re-run your packaging/lock step (poetry/pip-tools)
and verify installation works before merging.


[project.urls]
Homepage = "https://miquido.com"
Expand Down
8 changes: 7 additions & 1 deletion src/draive/evaluation/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
ctx,
execute_concurrently,
)
from haiway.attributes import AttributesJSONEncoder

from draive.evaluation.evaluator import EvaluatorResult
from draive.evaluation.scenario import EvaluatorScenarioResult
Expand Down Expand Up @@ -945,4 +946,9 @@ def _file_save(
) -> None:
self._path.parent.mkdir(parents=True, exist_ok=True)
with open(self._path, mode="wb+") as file:
file.write(json.dumps([case.to_mapping() for case in cases]).encode("utf-8"))
file.write(
json.dumps(
[case.to_mapping() for case in cases],
cls=AttributesJSONEncoder,
).encode("utf-8")
)
2 changes: 1 addition & 1 deletion src/draive/mcp/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def _expose_resources( # noqa: C901
)

case ResourceTemplate():
if resource.arguments:
if resource.has_args:
resource_template_declarations.append(
MCPResourceTemplate(
uriTemplate=resource.declaration.template_uri,
Expand Down
19 changes: 10 additions & 9 deletions src/draive/models/tools/function.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from collections.abc import Callable, Coroutine, Iterable
from typing import Any, Protocol, Self, cast, final, overload

from haiway import Meta, MetaValues, TypeSpecification, ctx
from haiway import Function, Meta, MetaValues, TypeSpecification, ctx

from draive.models.tools.types import (
ToolAvailabilityChecking,
Expand All @@ -19,7 +19,6 @@
Multimodal,
MultimodalContent,
)
from draive.parameters import ParametrizedFunction

__all__ = (
"FunctionTool",
Expand All @@ -28,7 +27,7 @@


@final
class FunctionTool[**Args, Result](ParametrizedFunction[Args, Coroutine[None, None, Result]]):
class FunctionTool[**Args, Result](Function[Args, Coroutine[None, None, Result]]):
"""Wraps an async function and exposes it as a Tool.

Builds the tool specification from the function signature (or provided parameters),
Expand Down Expand Up @@ -87,21 +86,23 @@ def __init__(
"description",
description,
)
assert all(arg.name in self._keyword_arguments for arg in self._positional_arguments) # nosec: B101
assert self._variadic_positional_arguments is None # nosec: B101

if parameters is None:
aliased_required: list[str] = []
specifications: dict[str, TypeSpecification] = {}
for parameter in self._parameters.values():
specification: TypeSpecification | None = parameter.specification
for argument in self._keyword_arguments.values():
specification: TypeSpecification | None = argument.specification
if specification is None:
raise RuntimeError(
f"Function argument {parameter.name} does not provide a valid specification"
f"Function argument {argument.name} does not provide a valid specification"
)

specifications[parameter.alias or parameter.name] = specification
specifications[argument.alias or argument.name] = specification

if parameter.required:
aliased_required.append(parameter.alias or parameter.name)
if argument.required:
aliased_required.append(argument.alias or argument.name)

parameters = {
"type": "object",
Expand Down
6 changes: 1 addition & 5 deletions src/draive/parameters/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
from draive.parameters.function import ParametrizedFunction
from draive.parameters.model import DataModel

__all__ = (
"DataModel",
"ParametrizedFunction",
)
__all__ = ("DataModel",)
193 changes: 0 additions & 193 deletions src/draive/parameters/function.py

This file was deleted.

Loading