Spaces:
Sleeping
Sleeping
Commit History
-
LLM fallback chain + Reset button + Accordion UI + per-run audit
Three independent fixes, all driven by the user's report after the last deployment: 1. LLM fallback chain (Gemini 429 -> OpenRouter -> echo). Gemini's free tier rate-limits aggressively (HTTP 429). When the 429 fires the chat used to die with a 'low confidence' note and the user had no fallback. cdpr.llm.config.resolve_fallback_chain now returns an ordered provider list driven by CDPR_LLM_FALLBACK_ CHAIN or, when unset, by which keys are configured. simulation_ builder.describe_to_request walks the chain and uses whichever provider returns parseable JSON first; the echo stub is appended unconditionally so the call never raises. BuilderResult.notes reports which providers were tried and which won. docs/llm- providers.md gains a 'Automatic fallback chain' section. 2. Reset button + collapsible accordion sections. Robot & dynamics / Trajectory / Time / Controller are now wrapped in gr.Accordion (default open=False, like file-tree folders). The Traj…a89fdfb -
LLM provider abstraction + conversational simulation builder + token leak fix
Implements the directive's LLM integration layer cleanly: five providers, zero hard SDK dependencies, never crashes when no key is configured. Also fixes the immediate security issue: the previous deploy attempt embedded a write-scope HF token directly in the git remote URL (visible to anyone running git remote -v). Security fix The token-embedded remote URL was sanitised: git remote set-url space https://huggingface.co/spaces/JoeTach/cdpr-simulator The leaked token MUST also be revoked manually at https://huggingface.co/settings/tokens . See the runbook in docs/hf-auth-troubleshoot.md for the full rotation procedure. src/cdpr/llm/ --- provider-agnostic LLM layer base.py LLMProvider Protocol + LLMMessage / LLMResponse dataclasses + LLMUnavailableError. config.py LLMConfig.from_env() that reads .env via dotenv (optional dep), with canonical env-var names (GEMINI_API_KEY, OPENROUTER_API_KEY, OLLAMA…1f10b7b