Skip to content
Open
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
4 changes: 3 additions & 1 deletion src/openharness/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,9 @@ def resolve_model_setting(
if provider in {"openai", "openai_codex", "copilot"} and normalized in {"default", "best"}:
return "gpt-5.4"

return configured
# Strip display-only context-window suffixes like [1M] or [750K] that some
# model aliases carry in the UI but that external provider APIs reject.
return re.sub(r"\[\d+[KMkm]\]$", "", configured).strip()


def auth_source_provider_name(auth_source: str) -> str:
Expand Down
4 changes: 2 additions & 2 deletions src/openharness/engine/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ def _record_tool_carryover(
if resolved_file_path is not None:
_remember_active_artifact(context.tool_metadata, resolved_file_path)
if tool_name == "read_file" and resolved_file_path is not None:
offset = int(tool_input.get("offset") or 0)
limit = int(tool_input.get("limit") or 200)
offset = int(float(tool_input.get("offset") or 0))
limit = int(float(tool_input.get("limit") or 200))
_remember_read_file(
context.tool_metadata,
path=resolved_file_path,
Expand Down
1 change: 1 addition & 0 deletions src/openharness/tasks/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ async def _copy_output(self, task_id: str, process: asyncio.subprocess.Process)
async with self._output_locks[task_id]:
with self._tasks[task_id].output_file.open("ab") as handle:
handle.write(chunk)
handle.flush()

def _require_task(self, task_id: str) -> TaskRecord:
task = self._tasks.get(task_id)
Expand Down