DGXAI/driftcall-env
DriftCall — OpenEnv Env Space
OpenEnv-compliant RL environment exposing DriftCall, a voice-first Indic consumer concierge env under schema / policy / pricing / auth drift.
REST surface (OpenEnv v1.0)
All mutating endpoints require:
Authorization: Bearer <DRIFTCALL_ENV_TOKEN>
X-Session-Id: [A-Za-z0-9_-]{1,64}Error envelope:
{ "error": { "code": "<slug>", "message": "<str>", "request_id": "<asgi-id>" } }Cache-Control: no-store on every response. Only M5 max_sessions carries Retry-After: 30. No stack traces ever leak.
Action / observation schemas
- Action:
cells.step_04_models:DriftCallAction - Observation:
cells.step_04_models:DriftCallObservation
Reward function
Reward is a scalar in [-1.0, 1.0], computed at episode termination from five independent components, combined → calibrated → clamped:
Pipeline:
quality = combine_quality(R1..R5, weights)
brier = brier_penalty(confidence, R1)
reward_raw = quality * (1 - brier)
reward = apply_uncertain_floor(reward_raw, confidence, quality) # floor=0.50
final := clamp(reward, -1.0, 1.0)Hard rule (CLAUDE.md §13): No LLM judge anywhere in this pipeline. Every reward bit traces to deterministic, schema-grounded checks against the episode trace + the (possibly drifted) vendor schemas in data/.
Full spec: docs/modules/rewards.md in the source repo.
Episode params (passed in /reset)
max_turns = 16 per episode.
Build / deploy
# from repo root
bash deploy/env_space/build.sh # builds deploy/env_space/build/
bash deploy/env_space/build.sh --push # builds + uploads to HF_SPACE_REPO
# env vars
HF_SPACE_REPO default: DGXAI/driftcall-env
HF_TOKEN required for --pushSources
This Space is built from deploy/env_space/build.sh which rsyncs the canonical sources at the repo root:
app.py— FastAPI / OpenEnv server (786 LOC)cells/— importable modules (env, drift injector, rewards, …)data/— authored fixtures (briefs, drift patterns, schemas)Dockerfile— multi-stage CPU image; Kokoro + faster-whisper baked inopenenv.yaml— manifest validated byopenenv validate .requirements.txt— runtime deps (no training stack)
The model + LoRA adapter are not baked into the Space — eval calls reach out to HF Hub for the trained adapter (DGXAI/gemma-3n-e2b-driftcall-lora).
