Skip to content

OllamaModelBackend.generate_from_raw silently swallows batch exceptions #597

@planetf1

Description

@planetf1

OllamaModelBackend.generate_from_raw silently swallows batch exceptions

Description

generate_from_raw uses asyncio.gather(..., return_exceptions=True) to run concurrent requests, but silently converts any exception into ModelOutputThunk(value=""), storing the error only in result._generate_log.extra["error"] — invisible to callers.

ollama.py:465-474

Impact

Callers have no way to detect failures. Tests asserting result.value is not None pass silently even when requests are failing, since empty string is not None.

Related

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions