Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History
153 lines (124 loc) · 4.96 KB

File metadata and controls

153 lines (124 loc) · 4.96 KB

Claude Handoff: Multi-Provider Gateway Expansion

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

Completed Before This Session

  • Merged phoenixvc/tokenutil PR #1.
  • Tagged phoenixvc/tokenutil release v0.1.0.
  • Merged phoenixvc/sluice PR #121 into dev.
  • Synced local dev to origin/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 LiteLLM CustomLogger callback that rewrites model: "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

Completed In This Session

  • 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_providers from non-empty prod environment secrets:
    • GROQ_API_KEY
    • GEMINI_API_KEY
    • TOGETHERAI_API_KEY
    • OPENROUTER_API_KEY
    • FIREWORKS_API_KEY
    • MOONSHOT_API_KEY
  • The workflows now pass TF_VAR_enable_router_shim from ENABLE_ROUTER_SHIM.
  • Aligned prod workflow codex_api_version with infra/env/prod/terraform.tfvars: 2025-04-01-preview.
  • Updated docs/SECRETS.md with the optional provider secrets and ENABLE_ROUTER_SHIM=true.
  • Added the provider secrets to the GitHub prod environment. Do not record the values in repo files or handoff docs.
  • Set GitHub prod environment variable ENABLE_ROUTER_SHIM=true.

Current GitHub Prod Environment State

Prod environment secrets now include:

  • AZURE_OPENAI_API_KEY
  • AZURE_OPENAI_EMBEDDING_API_KEY
  • AZURE_OPENAI_EMBEDDING_ENDPOINT
  • AZURE_OPENAI_ENDPOINT
  • FIREWORKS_API_KEY
  • GEMINI_API_KEY
  • GROQ_API_KEY
  • MOONSHOT_API_KEY
  • MYSTIRA_AZURE_CREDENTIALS
  • OPENROUTER_API_KEY
  • STATE_SERVICE_SHARED_TOKEN
  • TF_BACKEND_CONTAINER
  • TF_BACKEND_RG
  • TF_BACKEND_SA
  • TOGETHERAI_API_KEY

Prod environment variables now include:

  • DASHBOARD_AUTH_MODE=entra
  • ENABLE_ROUTER_SHIM=true
  • ENTRA_CLIENT_ID=ec2f13ed-1b47-4002-ada3-b092e933a237
  • ENTRA_TENANT_ID=9530cd32-9e33-47f0-9247-ed964730b580
  • STATE_SERVICE_CONTAINER_IMAGE=ghcr.io/phoenixvc/sluice-state-service:sha-3c3ac34@sha256:35459ad19835055f4c046de6374620316f0c30076c11918841e1d71f6c683c64

Important Files

  • .github/workflows/deploy.yaml
  • .github/workflows/deploy-environment.yaml
  • docs/SECRETS.md
  • scripts/sluice_router.py
  • scripts/keys.yaml
  • infra/modules/sluice_aca/main.tf
  • infra/modules/sluice_aca/variables.tf
  • infra/env/prod/main.tf
  • infra/env/prod/variables.tf
  • infra/env/prod/terraform.tfvars
  • docs/architecture/11-multi-provider-routing.md
  • docs/architecture/12-tokenisation-conventions.md

Validation Run In This Session

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.py

Validation passed for the changed files and prod Terraform config.

Known caveat:

  • Full pnpm format:check is still expected to fail because the repo glob includes generated dashboard/.next files and unrelated pre-existing docs / workflows. Do not mass-format those unless explicitly requested.

Current Workspace State

Local uncommitted files:

  • .github/workflows/deploy.yaml
  • .github/workflows/deploy-environment.yaml
  • docs/SECRETS.md
  • .handoff.md

Branch:

dev...origin/dev

Next Work

  1. Review and commit the workflow/docs changes.
  2. Push the branch / open PR, or merge to the deployment branch according to the repo flow.
  3. Trigger prod deploy once the workflow changes are on the branch used by .github/workflows/deploy.yaml.
  4. After deploy, run:
python scripts/manage_keys.py apply
  1. Smoke test:
    • GET /v1/models
    • POST /v1/responses
    • POST /v1/embeddings
  2. 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

Security Note

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.