Skip to content

Commit 8c09dc9

Browse files
committed
fix: bedrock positional args in eval cli and adapt to tool parser changes in strands-sglang
1 parent bf46bf9 commit 8c09dc9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ classifiers = [
2121
"Topic :: Scientific/Engineering :: Artificial Intelligence",
2222
]
2323
dependencies = [
24-
"strands-sglang>=0.1.2",
24+
"strands-sglang>=0.1.3",
2525
"strands-agents-tools",
2626
"boto3>=1.26.0",
2727
"transformers>=4.0.0,<5.0.0",

src/strands_env/cli/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ def build_model_factory(config: ModelConfig, max_concurrency: int) -> ModelFacto
8181
if not config.model_id:
8282
raise click.ClickException("--model-id is required for Bedrock backend")
8383
if config.role_arn:
84-
session = get_assumed_role_session(config.role_arn, config.region)
84+
boto_session = get_assumed_role_session(config.role_arn, config.region)
8585
else:
86-
session = get_boto3_session(config.region, config.profile_name)
87-
return bedrock_model_factory(session, config.model_id, sampling)
86+
boto_session = get_boto3_session(config.region, config.profile_name)
87+
return bedrock_model_factory(model_id=config.model_id, boto_session=boto_session, sampling_params=sampling)
8888

8989
else:
9090
raise click.ClickException(f"Unknown backend: {config.backend}")

src/strands_env/core/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
from strands.models.bedrock import BedrockModel
5050
from strands.models.openai import OpenAIModel
5151
from strands_sglang import SGLangClient, SGLangModel
52-
from strands_sglang.tool_parser import HermesToolCallParser, ToolCallParser
52+
from strands_sglang.tool_parsers import HermesToolParser, ToolParser
5353
from transformers import PreTrainedTokenizerBase
5454

5555
#: Factory that produces a fresh `Model` per step (for concurrent step isolation).
@@ -67,7 +67,7 @@ def sglang_model_factory(
6767
model_id: str,
6868
tokenizer: PreTrainedTokenizerBase,
6969
client: SGLangClient,
70-
tool_call_parser: ToolCallParser = HermesToolCallParser(),
70+
tool_parser: ToolParser = HermesToolParser(),
7171
sampling_params: dict[str, Any] = DEFAULT_SAMPLING_PARAMS,
7272
enable_thinking: bool | None = None,
7373
) -> ModelFactory:
@@ -83,7 +83,7 @@ def sglang_model_factory(
8383
return lambda: SGLangModel(
8484
tokenizer=tokenizer,
8585
client=client,
86-
tool_call_parser=tool_call_parser,
86+
tool_parser=tool_parser,
8787
params=sampling_params,
8888
model_id=model_id,
8989
return_logprobs=True,

0 commit comments

Comments
 (0)