avocet/app
pyr0ball 2891606765 feat(cloud_session): add session resolution + forward user_id to cf-orch imitate
app/cloud_session.py:
- Thin wrapper around cf_core.cloud_session.CloudSessionFactory
- BYOK detection reads ~/.config/circuitforge/llm.yaml (same path as other products)
- get_session: FastAPI dependency, returns CloudUser (user_id, tier, has_byok)
- require_tier: dependency factory for tier-gated routes

app/imitate.py:
- _run_cftext gains user_id: str | None param; non-None values included in
  the cf-orch ServiceAllocateRequest so premium users get their custom models
- run_imitate injects session via Depends(_get_imitate_session); extracts user_id,
  filters out local/anon sessions (they get the shared catalog), passes real
  cloud user_id to the ThreadPoolExecutor fanout
- _get_imitate_session wraps get_session with a try/except so imitate keeps
  working in envs where cloud_session deps aren't installed
2026-04-24 16:41:45 -07:00
..
api.py feat(imitate): parallel cf-text fanout workers + signal-based cold-start detection 2026-04-24 14:56:09 -07:00
cforch.py feat: Imitate tab — pull CF product samples, compare LLM responses 2026-04-09 20:12:57 -07:00
cloud_session.py feat(cloud_session): add session resolution + forward user_id to cf-orch imitate 2026-04-24 16:41:45 -07:00
imap_fetch.py refactor: consolidate HTML extraction into app/utils.py 2026-04-08 06:52:15 -07:00
imitate.py feat(cloud_session): add session resolution + forward user_id to cf-orch imitate 2026-04-24 16:41:45 -07:00
models.py feat(models): extended model registry + manage.sh benchmark subcommands 2026-04-24 14:56:24 -07:00
sft.py feat(#14): default bench_results_dir + testability seam 2026-04-09 12:28:38 -07:00
style.py refactor(bench): extract benchmark tabs — classifier, compare, llm-eval, style, voice 2026-04-24 14:56:17 -07:00
utils.py fix: sft router — yaml error handling, none filter, shared jsonl utils, fixture restore 2026-04-08 14:07:09 -07:00
voice.py refactor(bench): extract benchmark tabs — classifier, compare, llm-eval, style, voice 2026-04-24 14:56:17 -07:00