Skip to content

docs(osa): move the OSA documentation to the Claude Platform on AWS - #38

Merged
neuromechanist merged 5 commits into
mainfrom
feature/issue-37-claude-platform-docs
Sep 17, 2026
Merged

neuromechanist merged 5 commits into
mainfrom
feature/issue-37-claude-platform-docs

Conversation

@neuromechanist

Copy link
Copy Markdown
Member

Closes #37. Documentation half of OSA epic OpenScience-Collective/osa#360, which moved the platform route from OpenRouter to the Claude Platform on AWS (Anthropic-operated, billed through AWS Marketplace, not Amazon Bedrock).

Every page was checked against the code on the epic branch rather than edited by search and replace, which is how the corrections below turned up.

What changed

API and CLI references (api-reference.md, cli-reference.md, getting-started.md, index.md, mirrors.md)

  • Both BYOK headers documented: X-Anthropic-API-Key (wins when both are sent) and X-OpenRouter-Key. There is no api_key body field, and examples showing one are gone.
  • The model override names the two offered models, and says any other id needs your own OpenRouter key.
  • citations documented on /ask, /chat, in the SSE stream, and in a new Response Fields table with tool_calls, model and request_id.
  • osa init, -k/--api-key, config set --anthropic-key, the key priority order, and the CLI and server environment variables including ANTHROPIC_BASE_URL and ANTHROPIC_WORKSPACE_ID.

Registry guides (registry/schema-reference.md, registry/local-testing.md)

  • Agent config: the two offered models, legacy aliases that still normalize, provider accepted and ignored, and temperature honored by Haiku only. Warnings for the two silent-cost cases osa validate flags.
  • Local testing: osa validate --test-api-key, per-platform environment variables, testing through either BYOK header, and citation checks with the preloaded-docs exception stated.

Troubleshooting (troubleshooting.md)

  • Key resolution via anthropic_api_key_env_var and ANTHROPIC_API_KEY_XXX; timeouts point at Haiku 4.5 and status.anthropic.com.
  • Sonnet vs Haiku instead of models the platform no longer offers, including that Haiku thinks on a fixed budget and Sonnet decides per request.
  • Real rates ($1.00/$5.00 and $2.00/$10.00 per 1M tokens), prompt caching as cause and fix, and GET /{community_id}/metrics -> total_estimated_cost for checking spend. Opus is not offered, so the advice to downgrade to it is gone.

Architecture and slides (architecture.md, architecture-details.md, both SVGs, presentations/slides/osa-platform/osa-platform.json)

  • LLM access is langchain-anthropic to the Claude Platform; LiteLLM survives on the OpenRouter BYOK path only and is labeled that way.
  • X-OpenAI-API-Key dropped from the auth box: the server no longer reads that header (osa#393).
  • FAQ slide: both stages run Haiku 4.5, so the ~85% saving comes from only summarizing threads that clear the quality threshold, not from a cheaper stage-1 model.

Corrections to pre-existing errors found while fact-checking

  • The chat example sent messages; the field is message.
  • /ask was documented as streaming by default. It is not; /chat is.
  • The streaming example did not set stream: true.
  • Local testing told readers to use a --standalone flag the CLI does not have. The CLI is an HTTP client, so it now points at the local server with --api-url.
  • A citation example named www.hed-resources.org, a host that does not resolve, and /communities showed the same for HED's documentation link. Both now use the URL the config actually serves.
  • A link to ../api-reference.md#inline-citations, an anchor that does not exist.

Verification

  • uv run mkdocs build clean for every osa/ page; the one remaining warning is a pre-existing broken link inside the oscar submodule, and CI does not build with --strict
  • Every external link introduced here returns 200 (api.anthropic.com/v1/models returns 401 unauthenticated, as expected for a key probe)
  • Both SVGs parse, and new label widths were measured against their boxes
  • The slide JSON parses

Remaining OpenRouter mentions across these pages are deliberate: BYOK still accepts an OpenRouter key, and a community funded that way keeps working.

OSA now runs on the Claude Platform on AWS, so the reference pages had to
stop describing an OpenRouter-only service.

- Both key headers are documented: X-Anthropic-API-Key, preferred when both
  are sent, and X-OpenRouter-Key. There is no api_key body field, and the
  examples that showed one are gone.
- The model override lists the two offered models and says that anything else
  needs your own OpenRouter key.
- `citations` is documented on both /ask and /chat, in the SSE stream, and in
  a Response Fields table alongside tool_calls, model and request_id.
- Corrected pre-existing errors found while there: the chat example sent
  `messages` when the field is `message`, /ask was documented as streaming by
  default when it is not, the streaming example did not set `stream: true`,
  and page_context was undocumented.
- CLI pages cover `osa init`, `-k/--api-key`, `config set --anthropic-key`,
  the rewritten key priority order, and the CLI and server environment
  variables including ANTHROPIC_BASE_URL and ANTHROPIC_WORKSPACE_ID.
- Key links point at platform.claude.com rather than the old console host.

The citation example now uses a HED document that exists: the old one named
www.hed-resources.org, a host that does not resolve.
Schema reference: the agent-config table names the two offered models and the
legacy aliases that still normalize, records that `provider` is accepted and
ignored, and states that `temperature` is honored by Haiku only. Two warnings
cover what silently costs money or gets dropped, Sonnet on the evaluation
agent and a temperature next to Sonnet, both of which `osa validate` flags.
The example is the real eeglab config rather than an invented one.

Local testing: adds the validation step with --test-api-key, the environment
variables per platform (including ANTHROPIC_BASE_URL and
ANTHROPIC_WORKSPACE_ID, which only work as a pair), a section on testing with
your own key through the two BYOK headers, and citation checks in step 6 with
the preloaded-docs exception stated. Removed the `--standalone` flag, which
the CLI does not have; it is an HTTP client, so the guide now points it at the
local server with --api-url and notes that it always sends a key of its own.
The missing-key section names anthropic_api_key_env_var and the
ANTHROPIC_API_KEY_XXX convention. Timeouts point at Haiku 4.5 and
status.anthropic.com. The slow-response section compares Sonnet with Haiku
instead of models the platform no longer offers, and explains that Haiku
thinks on a fixed budget while Sonnet decides per request.

The cost section now carries the real rates ($1.00/$5.00 and $2.00/$10.00 per
1M tokens), prompt caching as both a cause and a fix, and
GET /{community_id}/metrics -> total_estimated_cost for checking spend. Opus
is not offered here, so the advice to downgrade to it is gone.

Remaining OpenRouter references are deliberate: they cover a community funded
through OpenRouter, which still works.
The diagrams and the architecture pages still showed OpenRouter as the LLM
provider with LiteLLM in front of it. Platform traffic now goes through
langchain-anthropic to the Claude Platform on AWS; LiteLLM survives on one
path only, an OpenRouter key supplied by the caller, and is labeled as such.

Also drops X-OpenAI-API-Key from the authentication box: the server no longer
reads that header at all. Label widths were measured against their boxes so
nothing overflows, and both SVGs still parse.
The tech-choices table credited "LiteLLM + OpenRouter" for LLM access. The FAQ
slide had stage 1 on a quantized Qwen, which is not reachable now that FAQ
generation runs on the Claude Platform.

Both stages run Haiku 4.5 today, so the ~85% saving comes from what stage 2
never sees rather than from a cheaper model: scoring is a short prompt
returning one number, summarizing sends a whole thread, and only the threads
that clear the 0.7 threshold get summarized. The speaker notes say that.
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.

OSA docs: replace the OpenRouter platform route with the Claude Platform on AWS

1 participant