Skip to content

Fix/chat for pzz - #23

Merged
Voronapxl merged 7 commits into
devfrom
fix/chat_for_pzz
Jun 30, 2026
Merged

Fix/chat for pzz#23
Voronapxl merged 7 commits into
devfrom
fix/chat_for_pzz

Conversation

@Voronapxl

Copy link
Copy Markdown
Collaborator

No description provided.

Voronapxl and others added 7 commits June 27, 2026 13:04
Add POST /tasks/classify-only/chat/stream — the classify-only counterpart of
the upload chat flow. It grounds the conversational answer in a new
classifier-candidate summary (top-1/top-5 VRI per object) emitted as a
`classify_summary` SSE event, instead of the object-zone-fit report.

- tasks.py: build_classify_summary_response + GET /tasks/{id}/classify-summary;
  task_stream_with_chat_generator gains report_kind ("object_zone_fit" |
  "classify") selecting the grounding report and its SSE event.
- classifier.py: rename POST /tasks/chat/stream -> /tasks/pzz-check/chat/stream
  for symmetry with classify-only; keep the old path as a deprecated alias on
  the same handler so existing frontends keep working.
- docs + tests updated.
Build .env.development from two Actions variables (non-sensitive app params and
service URLs, editable inline in the UI) plus one secret (credentials), instead
of a single ENV_FILE blob. Concatenated ENV_APP + ENV_URLS + ENV_SECRET, secret
last so a credential wins on any dup. Legacy ENV_FILE / ENV_PATH kept as
fallbacks so existing deploys keep working until the switch.
Add /admin/config/* to view, set and delete app params and service URLs at
runtime without a redeploy, guarded by the ADMIN_API_TOKEN shared secret
(X-Admin-Token header).

Overrides persist to a new config_override table (shared by every container) and
each process syncs them into its own os.environ on a short TTL, busting the
Settings cache — so api / worker / worker_llm and the pipeline subprocess (which
inherits os.environ) all pick up changes within a few seconds. Credentials and
boot-only keys are never overridable or shown unmasked; a bad value is rejected
(pre-validated against Settings) without clobbering an existing override; any DB
hiccup falls back to the deployed env.

- models.py + alembic 0002: config_override table
- infrastructure/config_runtime.py: store + os.environ sync (TTL, DENY-list)
- settings.py: split get_settings (override-aware) / _build_settings_cached;
  ADMIN_API_TOKEN setting
- dependencies.get_app_settings: return live settings so the API is override-aware
- runners/pipeline_runner: apply overrides before spawning the subprocess
- api/admin_config.py: GET settings/overrides/{key}, PUT/DELETE/{key}, POST reload
- tests + README
- clients.py: the embedding vectorizer now reads EMBED_MODEL instead of a
  separate VECTORIZER_MODEL (same value, one source of truth).
- clients.py: CLIENT_CERT_PATH / CLIENT_KEY_PATH / CA_CERT_PATH are read via a
  null-safe getter, so they can be omitted from env. mTLS only ever applied to
  https endpoints (a no-op over the internal http GPU URLs); the cert logic
  stays dormant and re-activates if the vars are set again.
- workflow: drop the now-dead "Copy keys" step (KEYS_PATH) — those certs are
  unused over http. Remove the KEYS_PATH repo secret separately if desired.

Lets ENV_APP shed VECTORIZER_MODEL + the three cert-path vars.
1. Transferred var from env tro code
1. Fix for broken vars
@Voronapxl
Voronapxl merged commit 2029f1f into dev Jun 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant