yau-plant-assistant/api
Claude b50fed8794 Restore the Langfuse client - it was already live and the repo had lost it
api/agent.py imports AzureOpenAI from langfuse.openai rather than from
openai. It is a drop-in with identical constructor and call signatures
that records each call as a Langfuse generation carrying the model and
token usage the plain client discards, which is the only thing Langfuse
can price. Without it, cost never appears in the UI.

This was dropped from the repository at the start of the 1 September
audit, on the reasonable-looking grounds that it was an unrelated concern
mixed into an unrelated change. It was not: it is deployed. The running
ai-api image has `from langfuse.openai import AzureOpenAI` at
/app/agent.py line 33 with langfuse 2.57.0 installed, and langfuse==2.57.0
has been in api/requirements.txt all along. The blob restored here is
byte-identical to what the host is running.

Rebuilding ai-api from the repository as it stood would have silently
removed live cost tracking from production. That is the second time in
this audit that the repository turned out not to describe the host, and
the first where acting on the repository would have caused a regression
rather than merely documenting one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-01 20:19:00 +10:00
..
tests Fix three defects the first real document exposed 2026-08-28 15:03:31 +10:00
tools Refuse a retired PS_* name instead of finding nothing 2026-09-01 19:00:57 +10:00
agent.py Restore the Langfuse client - it was already live and the repo had lost it 2026-09-01 20:19:00 +10:00
app_healthcheck.py Scaffold the WRPS plant operations assistant repository 2026-08-20 13:56:32 +10:00
chunking.py Fix three defects the first real document exposed 2026-08-28 15:03:31 +10:00
classifier.py Take the facts back off the model 2026-08-28 10:54:29 +10:00
config.py Add the document library screens: upload, review, withdraw, restore 2026-08-28 14:13:17 +10:00
contracts.py Take the facts back off the model 2026-08-28 10:54:29 +10:00
convert.py Fix three defects the first real document exposed 2026-08-28 15:03:31 +10:00
Dockerfile Add the document library screens: upload, review, withdraw, restore 2026-08-28 14:13:17 +10:00
documents.py Fix three defects the first real document exposed 2026-08-28 15:03:31 +10:00
guardrails.py Pin the site timezone on every Cube query 2026-08-21 15:23:27 +10:00
identity.py Add the document library screens: upload, review, withdraw, restore 2026-08-28 14:13:17 +10:00
main.py Add the document library screens: upload, review, withdraw, restore 2026-08-28 14:13:17 +10:00
requirements-docs.txt Add the document library screens: upload, review, withdraw, restore 2026-08-28 14:13:17 +10:00
requirements.txt Scaffold the WRPS plant operations assistant repository 2026-08-20 13:56:32 +10:00
stub.py Add NO_LLM_STUB: the whole chain, working, without a model 2026-08-21 15:24:25 +10:00