Skip to content

feat(ai): add Cerebras + Cloudflare providers; harden pipeline#9

Merged
Azyrn merged 1 commit into
mainfrom
ai-pipeline-hardening
Jul 6, 2026
Merged

feat(ai): add Cerebras + Cloudflare providers; harden pipeline#9
Azyrn merged 1 commit into
mainfrom
ai-pipeline-hardening

Conversation

@Azyrn

@Azyrn Azyrn commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Cerebras + Cloudflare Workers AI BYOK providers, plus fixes from the AI pipeline audit.

Feature

  • Cerebras and Cloudflare providers (CF: account id folded into the run URL, token + account id treated as one inseparable pair)
  • Bundled free-tier NVIDIA/Cloudflare keys injected from local.properties

Audit fixes

  • NVIDIA key verification was a no-opGET /v1/models is public and returns 200 for any key (live-verified); now probes chat/completions with max_tokens=1 (401/403 on bad keys)
  • Streaming degrade — a 200 response with no SSE data lines now falls back to plain requests instead of killing the whole provider fallback chain
  • Cloudflare bundled accounting — CF counts as bundled when either half of the user pair is missing, matching resolve()'s pair fallback
  • Strip unterminated <think> blocks; remember Mistral OCR model swap across pages; redact nvapi-/gsk_/hf_/cfut_ tokens in logs
  • Password keyboard on key fields; correct NVIDIA default-model hint
  • Route only image/* mimes to bitmap decode (video/mp4 now gets the unsupported-type error); drop dead MAX_PDF_PAGES
  • Evict completed verification jobs; raise OpenAI-compat read timeout to 90 s to match the executor's attempt budget

:app:compileDebugKotlin passes.

🤖 Generated with Claude Code

- Cerebras and Cloudflare Workers AI BYOK providers (CF: account id
  folded into the run URL, token + account treated as one pair)
- NVIDIA key verify was a no-op: GET /v1/models is public and returns
  200 for any key; probe chat/completions with max_tokens=1 instead
- degrade to plain requests when a 200 stream carries no SSE data
  instead of failing the whole fallback chain
- count Cloudflare as bundled when either half of the user pair is
  missing, matching resolve()'s fallback to the bundled pair
- strip unterminated <think> blocks; remember Mistral OCR model swap
  across pages; redact nvapi-/gsk_/hf_/cfut_ tokens in logs
- password keyboard on key fields; fix NVIDIA default-model hint
- route only image/* mimes to bitmap decode; drop dead MAX_PDF_PAGES
- evict completed verification jobs; raise OpenAI-compat read timeout
  to 90s to match the executor's attempt budget

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
scanly Ready Ready Preview, Comment Jul 6, 2026 4:42am

@Azyrn Azyrn merged commit f29b5c9 into main Jul 6, 2026
4 of 5 checks passed
@Azyrn Azyrn deleted the ai-pipeline-hardening branch July 6, 2026 04:44
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