Date: 2026-05-11
Repo: phoenixvc/sluice
Current branch: dev
Current HEAD: 83bbfba feat(routing): multi-provider routing with smart auto alias (ADR 11) (#121)
Workspace state: dirty; workflow/docs handoff changes are local and uncommitted
- Merged
phoenixvc/tokenutilPR #1. - Tagged
phoenixvc/tokenutilreleasev0.1.0. - Merged
phoenixvc/sluicePR #121 intodev. - Synced local
devtoorigin/dev. - Added optional multi-provider LiteLLM routing through
extra_providers. - Added policy aliases:
auto,cheap-fast,cheap-reasoning,cheap-long-context,premium,openrouter-free,kimi-coding. - Added direct aliases for Claude Code / Kimi use:
kimi-coding,kimi-k2,moonshot-kimi-k2. - Added
scripts/sluice_router.py, a LiteLLMCustomLoggercallback that rewritesmodel: "auto"before the upstream call. - Added
router_shim_tokenutil_package, defaulting to:
phoenixvc-tokenutil @ https://github.com/phoenixvc/tokenutil/archive/refs/tags/v0.1.0.tar.gz
- Patched GitHub Actions so production deploys can actually activate the
optional providers:
.github/workflows/deploy.yaml.github/workflows/deploy-environment.yaml
- The workflows now build
TF_VAR_extra_providersfrom non-empty prod environment secrets:GROQ_API_KEYGEMINI_API_KEYTOGETHERAI_API_KEYOPENROUTER_API_KEYFIREWORKS_API_KEYMOONSHOT_API_KEY
- The workflows now pass
TF_VAR_enable_router_shimfromENABLE_ROUTER_SHIM. - Aligned prod workflow
codex_api_versionwithinfra/env/prod/terraform.tfvars:2025-04-01-preview. - Updated
docs/SECRETS.mdwith the optional provider secrets andENABLE_ROUTER_SHIM=true. - Added the provider secrets to the GitHub
prodenvironment. Do not record the values in repo files or handoff docs. - Set GitHub
prodenvironment variableENABLE_ROUTER_SHIM=true.
Prod environment secrets now include:
AZURE_OPENAI_API_KEYAZURE_OPENAI_EMBEDDING_API_KEYAZURE_OPENAI_EMBEDDING_ENDPOINTAZURE_OPENAI_ENDPOINTFIREWORKS_API_KEYGEMINI_API_KEYGROQ_API_KEYMOONSHOT_API_KEYMYSTIRA_AZURE_CREDENTIALSOPENROUTER_API_KEYSTATE_SERVICE_SHARED_TOKENTF_BACKEND_CONTAINERTF_BACKEND_RGTF_BACKEND_SATOGETHERAI_API_KEY
Prod environment variables now include:
DASHBOARD_AUTH_MODE=entraENABLE_ROUTER_SHIM=trueENTRA_CLIENT_ID=ec2f13ed-1b47-4002-ada3-b092e933a237ENTRA_TENANT_ID=9530cd32-9e33-47f0-9247-ed964730b580STATE_SERVICE_CONTAINER_IMAGE=ghcr.io/phoenixvc/sluice-state-service:sha-3c3ac34@sha256:35459ad19835055f4c046de6374620316f0c30076c11918841e1d71f6c683c64
.github/workflows/deploy.yaml.github/workflows/deploy-environment.yamldocs/SECRETS.mdscripts/sluice_router.pyscripts/keys.yamlinfra/modules/sluice_aca/main.tfinfra/modules/sluice_aca/variables.tfinfra/env/prod/main.tfinfra/env/prod/variables.tfinfra/env/prod/terraform.tfvarsdocs/architecture/11-multi-provider-routing.mddocs/architecture/12-tokenisation-conventions.md
pnpm exec prettier --check .github/workflows/deploy.yaml .github/workflows/deploy-environment.yaml docs/SECRETS.md
git diff --check -- .github/workflows/deploy.yaml .github/workflows/deploy-environment.yaml docs/SECRETS.md
terraform validate # from infra/env/prod; required escalation on Windows sandbox
python -m py_compile scripts\sluice_router.pyValidation passed for the changed files and prod Terraform config.
Known caveat:
- Full
pnpm format:checkis still expected to fail because the repo glob includes generateddashboard/.nextfiles and unrelated pre-existing docs / workflows. Do not mass-format those unless explicitly requested.
Local uncommitted files:
.github/workflows/deploy.yaml.github/workflows/deploy-environment.yamldocs/SECRETS.md.handoff.md
Branch:
dev...origin/dev
- Review and commit the workflow/docs changes.
- Push the branch / open PR, or merge to the deployment branch according to the repo flow.
- Trigger prod deploy once the workflow changes are on the branch used by
.github/workflows/deploy.yaml. - After deploy, run:
python scripts/manage_keys.py apply- Smoke test:
GET /v1/modelsPOST /v1/responsesPOST /v1/embeddings
- Exercise
model: "auto"with:- normal short prompt
- reasoning
metadata.stage - long-context prompt over
SLUICE_LONG_CONTEXT_TOKENS metadata.route_hint: "kimi-coding"for Claude Code only
The provider API keys were pasted into chat during this session and then added as GitHub environment secrets. Rotate them after the deployment is stable if strict secret hygiene is required.