CLI: rename deprecated args (#11568)

This commit is contained in:
Rohit Malhotra
2025-10-30 09:20:27 -04:00
committed by GitHub
parent 2fc31e96d0
commit 97403dfbdb
5 changed files with 6 additions and 6 deletions

View File

@@ -174,7 +174,7 @@ class SettingsScreen:
model=model,
api_key=api_key,
base_url=base_url,
service_id='agent',
usage_id='agent',
metadata=get_llm_metadata(model_name=model, llm_type='agent'),
)

View File

@@ -18,7 +18,7 @@ def read_json(path: Path) -> dict:
def make_screen_with_conversation(model='openai/gpt-4o-mini', api_key='sk-xyz'):
llm = LLM(model=model, api_key=SecretStr(api_key), service_id='test-service')
llm = LLM(model=model, api_key=SecretStr(api_key), usage_id='test-service')
# Conversation(agent) signature may vary across versions; adapt if needed:
from openhands.sdk.agent import Agent
@@ -31,7 +31,7 @@ def seed_file(path: Path, model: str = 'openai/gpt-4o-mini', api_key: str = 'sk-
store = AgentStore()
store.file_store = LocalFileStore(root=str(path))
agent = get_default_cli_agent(
llm=LLM(model=model, api_key=SecretStr(api_key), service_id='test-service')
llm=LLM(model=model, api_key=SecretStr(api_key), usage_id='test-service')
)
store.save(agent)

View File

@@ -50,7 +50,7 @@ class FakeAgent(AgentBase):
@pytest.fixture()
def agent() -> FakeAgent:
llm = LLM(**default_config(), service_id='test-service')
llm = LLM(**default_config(), usage_id='test-service')
return FakeAgent(llm=llm, tools=[])

View File

@@ -37,7 +37,7 @@ class TestToolFix:
"""Test that entire tools list is replaced with default tools when loading agent."""
# Create a mock agent with different tools and working directories
mock_agent = Agent(
llm=LLM(model='test/model', api_key='test-key', service_id='test-service'),
llm=LLM(model='test/model', api_key='test-key', usage_id='test-service'),
tools=[
Tool(name='BashTool'),
Tool(name='FileEditorTool'),

View File

@@ -26,7 +26,7 @@ def _create_agent(mcp_config=None) -> Agent:
if mcp_config is None:
mcp_config = {}
return Agent(
llm=LLM(model='test-model', api_key='test-key', service_id='test-service'),
llm=LLM(model='test-model', api_key='test-key', usage_id='test-service'),
tools=[],
mcp_config=mcp_config,
)