Repository navigation
Models, providers (GLM + Kimi first-class), and the jsclaw onboard wizard - #26
Merged
Merged
Conversation
Models: - config.model / heartbeatModel / group.model / input.model with input > group > config precedence; heartbeat runs on the cheap model when configured (the 48-cycles/day cost lever) - src/providers.js: presets — Anthropic, Z.ai GLM, Moonshot Kimi (both via their Anthropic-compatible endpoints, first-class today), Bedrock, Vertex, custom/LiteLLM; PROVIDER_ENV_KEYS whitelist; resolveProviderEnv (config beats host env) - Security: ANTHROPIC_API_KEY removed from docker argv (was ps-visible — audit finding #4); all provider credentials/endpoints now travel via stdin in ContainerInput.providerEnv; agent-runner applies them before querying and passes model to the SDK Onboarding (openclaw parity): - bin/onboard.js: interactive wizard on node:readline/promises — env checks, optional image build, provider/key/model selection, groups/main scaffold (SOUL.md, HEARTBEAT.md, memory), gateway token, jsclaw.json merge preserving raw ${ENV} references - Pure logic (buildOnboardConfig, mergeConfigFile, scaffoldGroup) exported and unit-tested; non-TTY guarded (exit 2) - gatewayToken config key; jsclaw gateway uses it Tests: 10 new — provider presets, env whitelist + config precedence, no-credentials-in-argv, onboard config building for all six providers, config merge preserving raw refs, idempotent scaffold, plus E2E proving model + credentials cross via stdin (envApiKey null in container) and model precedence. Full suite 119/119. v0.0.11, no npm publish. Closes #25
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.
Closes #25
Models & providers
Per-agent and per-heartbeat model selection with
input > group > configprecedence, and provider routing through the Anthropic API surface the Claude Code runtime actually speaks:heartbeatModelroutes the autonomy loop to a cheap model — openclaw's biggest cost lever, now wired intojsclaw gateway.Security fix riding along
ANTHROPIC_API_KEYis out of docker argv (it wasps-visible — audit finding #4). All provider credentials and endpoints now travel via stdin (ContainerInput.providerEnv) behind a whitelist; the E2E proves the container receives them on stdin whileprocess.env.ANTHROPIC_API_KEYfrom-eflags is null, and a unit test asserts noANTHROPIC*string ever appears in container argv.jsclaw onboardopenclaw-parity setup wizard, zero-dep on
node:readline/promises: environment checks, offers to build the agent image, provider + key + model selection (keys written as${ENV_VAR}references — never literals),groups/mainscaffold with starter SOUL.md/HEARTBEAT.md + memory, gateway token, next-steps summary. The config-building core is pure and unit-tested across all six providers; non-TTY invocations exit 2 cleanly.Verification
10 new tests; full suite 119/119 including Docker E2E. Zero new dependencies.
v0.0.11 (not published).