13 Commits

Author SHA1 Message Date
99c68c6744 Merge pull request 'fix(deploy): lower CPU reservation back to 500 to fit autobox' (#4) from fix/cpu-fit-autobox into main
All checks were successful
Build and Deploy BlaaAi / build-and-deploy (push) Successful in 5m22s
Reviewed-on: #4
2026-10-29 22:23:52 +01:00
Henrik Jess Nielsen
afa1c03d5a fix(deploy): lower CPU reservation back to 500 to fit autobox
autobox has ~580 MHz free; cpu=1000 could not be placed during rolling
replacement. CPU reservation is a scheduling floor (procs still burst on idle
cores), so 500 is enough for the batch scoring work. Memory stays at 1024.
2026-10-29 22:23:19 +01:00
d6806f386f Merge pull request 'fix(score): strip ANTHROPIC_API_KEY from CLI subprocess env' (#3) from fix/cli-oauth-env into main
Some checks failed
Build and Deploy BlaaAi / build-and-deploy (push) Has been cancelled
Reviewed-on: #3
2026-10-29 22:15:21 +01:00
Henrik Jess Nielsen
1171d965e8 fix(score): strip ANTHROPIC_API_KEY from CLI subprocess env
With ANTHROPIC_API_KEY also present in the environment, the claude CLI does
API-key auth and ignores CLAUDE_CODE_OAUTH_TOKEN, failing with 401 Invalid API
key when that key is invalid/out of credit. Strip it from the subprocess env so
the subscription token is used; the api backend still reads it from os.environ.
2026-10-29 22:12:24 +01:00
2925d86447 Merge pull request 'fix(deploy): match Consul key name for Claude auth token' (#2) from fix/claude-auth-consul-key into main
All checks were successful
Build and Deploy BlaaAi / build-and-deploy (push) Successful in 5m21s
Reviewed-on: #2
2026-10-29 22:01:47 +01:00
Henrik Jess Nielsen
ce9c968301 fix(deploy): match Consul key name for Claude auth token
The Nomad template read blaaai/claude_oauth_token but the token was stored
at blaaai/claude_auth_token, so CLAUDE_CODE_OAUTH_TOKEN rendered empty and
CLI auth failed in prod.
2026-10-29 22:00:43 +01:00
db8b4d0406 Merge pull request 'feat(score): add Claude CLI backend via subscription token' (#1) from feat/claude-cli-backend into main
Some checks failed
Build and Deploy BlaaAi / build-and-deploy (push) Has been cancelled
Reviewed-on: #1
2026-10-29 21:59:35 +01:00
Henrik Jess Nielsen
63a36da2f3 feat(score): add Claude CLI backend via subscription token
Replace the direct Anthropic API call in score.py with a pluggable backend
(BLAAAI_BACKEND=cli|api, default cli). The CLI path shells out to `claude -p`
authed by CLAUDE_CODE_OAUTH_TOKEN, so scoring counts against the Claude
subscription instead of API billing.

- _call_cli forces a tool-free, JSON-only role (--append-system-prompt,
  --disallowed-tools) and retries the intermittently-failing `claude -p`
- lower default concurrency (3) since each call spawns a heavy Node process
- metrics use the CLI's reported total_cost_usd and full token load
- batch failures no longer crash the whole scoring run
- remove the hardcoded live ANTHROPIC_API_KEY fallback (rotate it in console)
- Dockerfile installs Node + @anthropic-ai/claude-code
- Nomad injects CLAUDE_CODE_OAUTH_TOKEN via Consul, bumps memory for Node
2026-10-29 21:54:01 +01:00
Henrik Jess Nielsen
af84822641 Fix unwanted page scroll on desktop and mobile
All checks were successful
Build and Deploy BlaaAi / build-and-deploy (push) Successful in 4m38s
- Remove min-height:100vh + padding-bottom:22rem that caused overflow
- Replace with calc(100vh - 60px) to center form without scroll
- Add html,body height:100% and overflow-x:hidden
2026-05-24 22:26:37 +02:00
Henrik Jess Nielsen
12c3bc3e15 Add data quality normalization for cars: mileage in thousands and leasing prices
All checks were successful
Build and Deploy BlaaAi / build-and-deploy (push) Successful in 4m24s
- detect km < 500 on non-new cars (e.g. '130' instead of '130.000')
- detect prices < 5.000 kr (likely monthly leasing rate not sale price)
- flags shown in AI prompt → forces low score (1-3)
- orange warning box in UI distinct from AI warnings
2026-05-24 19:35:43 +02:00
Henrik Jess Nielsen
9299506523 Fix missing requests dependency
Some checks failed
Build and Deploy BlaaAi / build-and-deploy (push) Failing after 5m17s
2026-05-24 19:20:31 +02:00
Henrik Jess Nielsen
b6e70d61f9 Add Dockerfile, Nomad spec, Gitea CI/CD, requirements and health endpoint
Some checks failed
Build and Deploy BlaaAi / build-and-deploy (push) Has been cancelled
2026-05-24 19:14:41 +02:00
Henrik Jess Nielsen
57c29456ab first commit 2026-05-24 19:12:29 +02:00