docs: open-source model support, egress-allowlist correction, nav regrouping - #15
Merged
Merged
Conversation
`KSI_EGRESS_ALLOW` and the `*_BASE_URL` variables are read from the TypeScript runner's `process.env`, which the Python CLI builds from the provider profile plus a fixed system-key list. Neither is on either list, so a value exported in the shell never reaches `deriveEgressAllowlist` — the documented `KSI_EGRESS_ALLOW=... bash scripts/run_ksi.sh` form silently no-ops. Note the constraint rather than leaving a recipe that appears to work. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
KSI accepts only `anthropic` and `openai` as `MODEL_PROVIDER`, and nothing in the docs said so or explained what running an open-weight model would involve. Adds a page covering the high-level shape: put an Anthropic-Messages-format proxy in front of the model and reuse the existing SDK path rather than writing a provider adapter; host-side phases can be redirected today while the containerized agent cannot, since the base-URL variables aren't forwarded into the container. Notes what it affects (egress allowlist, prompt caching, cost reporting, structured output) and flags multi-turn tool-calling robustness as the real risk. Left as a future contribution rather than an implementation spec. Also warns that setting a base URL today splits traffic between the local server and the hosted API instead of failing loudly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Four placements didn't match content: - "Running larger runs" sat under "Programmatic API", but it documents CLI flags and explicitly frames `ksi.run(...)` as a layer over the parser it describes. It opens by naming its own place in the progression after the quickstart and your-own-tasks walkthroughs — so it belongs with them. - "Your own tasks" was a standalone tab despite being step two of that same progression. - "Contributing" sat under "Getting started", where a first-time user meets PR conventions before running the demo. It's contributor material, and extending.md already points at it. - "Benchmarks" trailed after "Reference" even though it's a usage guide for running the reference benchmarks yourself. Groups the three-step new-user path under "Getting started", moves Contributing under "Extending KSI", and lifts Benchmarks out of the post-reference slot. Landing-page cards track the change (they were deliberately unified with the nav tabs in 7f99358). Page URLs are derived from file paths, so no links change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs-only. Three independent changes, one commit each.
1. Document open-source / self-hosted model support
Nothing in the docs said which providers KSI accepts, or what running an
open-weight model would involve.
MODEL_PROVIDERtakes onlyanthropicandopenai— there is novllm,ollama, oropenrouterprovider.Adds a page covering the high-level shape rather than an implementation spec,
since this is a future contribution:
front of the model and reuse the existing SDK path, rather than writing a
provider adapter. The Claude Agent SDK honors
ANTHROPIC_BASE_URL/ANTHROPIC_AUTH_TOKEN, and the runner already forwards environment into it.reflection) can be redirected right now; the containerized agent can't,
because the base-URL variables aren't forwarded into the container.
structured output, and the direct adapters that bypass the SDK.
the plumbing.
Includes a warning that setting a base URL today doesn't error — it splits
traffic between the local server and the hosted API, which is the confusing
failure mode. A brief version lands in the FAQ.
2. Correct the egress-allowlist recipe in architecture
docs/architecture.mddocumentedKSI_EGRESS_ALLOW=host bash scripts/run_ksi.sh ...as the way to allowlist acustom provider endpoint. That variable is only read from the TypeScript
runner's
process.env, which the Python CLI builds from the provider profileplus a fixed system-key list — so a shell-exported value never reaches
deriveEgressAllowlistand the documented form silently no-ops.Found while researching change 1. Notes the constraint instead of leaving a
recipe that appears to work. No code change here; flagging it as a real gap.
The existing unit test passes
envstraight intoderive(), so it exercisesthe function but not the plumbing that feeds it.
3. Regroup nav so pages sit under what they're about
Three placements didn't match content:
"Running larger runs" documents CLI flags and explicitly frames
ksi.run(...)as a layer over the parser it describes — it opens by naming its own place in
the progression after the quickstart and your-own-tasks walkthroughs. Grouping
those three makes the new-user path one sequence.
Contributing was also misplaced under "Getting started", but #11 landed the same
observation independently while this was in review and promoted it to a
top-level tab. Rebased onto that decision rather than overriding it.
Landing-page cards track the change (they were deliberately unified with the nav
tabs in 7f99358).
Verification
mkdocs build --strictpasses (validates nav and internal links)./experiments/,/benchmarks/,/CONTRIBUTING/all render at unchanged paths, so no linksbreak.
docs/is reachable from the nav.src/ksi/providers.py. Re-ran the profile loader against the rebased code toconfirm the base-URL claims still hold:
MODEL_PROVIDERis still limited toanthropic/openai, andANTHROPIC_BASE_URL/ANTHROPIC_AUTH_TOKENarestill dropped by
load_provider_profile.Claims about SDK behavior were checked against the shipped packages
(
@anthropic-ai/claude-agent-sdk@0.1.77,@openai/agents@0.8.5) and thehalf-works/doesn't-work split was confirmed by running the profile loader and
runner-env builder directly.
🤖 Generated with Claude Code