Skip to content

[pull] main from Milkdown:main#206

Merged
pull[bot] merged 1 commit into
code:mainfrom
Milkdown:main
May 9, 2026
Merged

[pull] main from Milkdown:main#206
pull[bot] merged 1 commit into
code:mainfrom
Milkdown:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 9, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

* docs(crepe): document built-in OpenAI / Anthropic LLM providers

Adds a "Built-in Providers" subsection under the AI feature docs
covering the new factories that shipped in #2355:

- minimal usage (`createOpenAIProvider`, `createAnthropicProvider`)
- the three deployment modes (desktop BYOK, browser BYOK with
  `dangerouslyAllowBrowser`, backend proxy via `baseURL` + `headers`)
- shared `BaseProviderConfig` shape, including the `systemPrompt`
  contract (`undefined` → default, `null` → omit, string → as-is)
- per-provider extras (OpenAI `body` / `buildMessages`, Anthropic
  `maxTokens` / `anthropicVersion` / top-level `system` field)
- CORS note for direct browser calls

* docs(crepe): fix OpenAI buildMessages example to honor systemPrompt: null

The previous example used `defaults.systemPrompt ?? ''`, which
turned a deliberate `null` (the documented "omit" sentinel) into
an empty string and still sent a system message. The new example
spreads the system message conditionally so `null` truly omits it,
matching the behavior the prose above documents.

* docs(crepe): clarify env-var usage and spell out ACAO acronym

- Replace `process.env.*` in the minimal-usage snippet with a
  placeholder string and add a short paragraph explaining how to
  source the API key in browser builds (BYOK input, bundler env
  vars like Vite's `import.meta.env`, or omit entirely and proxy
  through a backend). `process.env` is Node-only.
- Spell out `Access-Control-Allow-Origin` on first use in the CORS
  note before falling back to the ACAO shorthand.

* docs(crepe): clarify browser key handling and shared-config note

- Re-label the minimal-usage snippet as a server-side shape and
  point readers at the "Deployment modes" section before they try
  to copy-paste it into a browser.
- Drop the misleading "build-time injected env vars are somewhere
  safe" wording. Vite-style `import.meta.env.VITE_*` substitutions
  end up as plain strings in the shipped JS — no different from a
  hard-coded key. Replace with an explicit note: the only safe
  options are BYOK (each user supplies their own key + opt-in) or
  routing through a backend proxy.
- Annotate the `BaseProviderConfig` block as illustrative since
  it isn't a public export, and direct TS users to the actual
  exported types (`OpenAIProviderConfig` / `AnthropicProviderConfig`).
@pull pull Bot locked and limited conversation to collaborators May 9, 2026
@pull pull Bot added the ⤵️ pull label May 9, 2026
@pull pull Bot merged commit adf15aa into code:main May 9, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant