Skip to content

Commit aee7a46

Browse files
committed
fix: instructor hooks crash + Dockerfile lockfile for consistent builds
- Fix on_completion_kwargs handler to accept **kwargs (instructor now passes messages, model, etc. as individual keyword args, not a dict) - Copy uv.lock into Docker image so builds use locked versions instead of re-resolving, which could install incompatible versions
1 parent 981afdf commit aee7a46

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

backend/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ RUN apk add --no-cache curl git
99
RUN addgroup -g 1001 app && adduser -D -G app -u 1001 app
1010

1111
# Install Python dependencies
12-
COPY pyproject.toml ./
12+
COPY pyproject.toml uv.lock ./
1313
ENV UV_LINK_MODE=copy
14-
RUN --mount=type=cache,target=/root/.cache/uv uv lock
1514
RUN --mount=type=cache,target=/root/.cache/uv uv sync --locked --quiet
1615

1716
# Fix ownership of the entire /app directory including .venv

backend/services/structured_llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def _register_hooks(client: instructor.AsyncInstructor) -> None:
3737
catching events that manual logging at the call site would miss.
3838
"""
3939

40-
def on_completion_kwargs(kwargs: dict[str, Any]) -> None:
40+
def on_completion_kwargs(**kwargs: Any) -> None:
4141
logger.info(
4242
"Structured LLM request",
4343
model=kwargs.get("model", "unknown"),

0 commit comments

Comments
 (0)