Skip to content

chore: migrate rust/llm_chatbot to icp-cli#1439

Draft
marc0olo wants to merge 1 commit into
masterfrom
chore/migrate-rust-llm-chatbot-to-icp-cli
Draft

chore: migrate rust/llm_chatbot to icp-cli#1439
marc0olo wants to merge 1 commit into
masterfrom
chore/migrate-rust-llm-chatbot-to-icp-cli

Conversation

@marc0olo

Copy link
Copy Markdown
Member

Summary

  • Replaces dfx.json with icp.yaml; the llm canister uses a pre-built WASM (v0.3.1, Ollama mode)
  • The ic environment excludes llmicp deploy does not redeploy it on mainnet
  • icp deploy auto-injects PUBLIC_CANISTER_ID:llm into the backend canister when deploying locally; ic-llm 1.2.0 reads that env var at runtime to reach the local LLM, and falls back to the hardcoded mainnet principal (w36hm-eqaaa-aaaal-qr76a-cai) when the var is absent
  • Bumps ic-cdk to 0.20, ic-llm to 1.2.0, edition to 2024
  • Adds backend.did (Candid interface from ic-llm ChatMessage types)
  • Migrates frontend from dfx declarations + vite-plugin-environment to @icp-sdk/bindgen + actor.js using safeGetCanisterEnv
  • Adds test.sh and CI workflow (rust-llm_chatbot job)
  • Removes dfx.json, BUILD.md, .devcontainer/

Note for reviewers: test.sh calls prompt and chat — these require Ollama running locally (ollama serve + llama3.1:8b model pulled). CI will fail without it; Ollama support in CI can be addressed in a follow-up.

🤖 Generated with Claude Code

- Replaces dfx.json with icp.yaml; llm canister uses pre-built WASM
  (v0.3.1, Ollama mode); ic environment excludes llm so icp deploy does
  not redeploy it on mainnet
- icp deploy auto-injects PUBLIC_CANISTER_ID:llm into the backend
  canister when deploying locally; ic-llm 1.2.0 reads that env var at
  runtime to reach the local LLM, falling back to the hardcoded mainnet
  principal (w36hm-eqaaa-aaaal-qr76a-cai) when the var is absent
- Bumps ic-cdk to 0.20, ic-llm to 1.2.0, edition to 2024
- Adds backend.did (interface from ic-llm ChatMessage types)
- Migrates frontend from dfx declarations + vite-plugin-environment to
  @icp-sdk/bindgen + actor.js using safeGetCanisterEnv
- Adds test.sh and CI workflow (rust-llm_chatbot job)
- Removes dfx.json, BUILD.md, .devcontainer/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@marc0olo marc0olo requested review from a team as code owners July 10, 2026 10:44
@marc0olo

Copy link
Copy Markdown
Member Author

Blocked on ic-llm 1.2.0 being published to crates.io. That release adds default_llm_canister() which reads the PUBLIC_CANISTER_ID:llm env var that icp deploy auto-injects — without it the backend can't reach the locally-deployed LLM canister. Coordinating with the ic-llm maintainer to get the release cut.

@marc0olo marc0olo marked this pull request as draft July 10, 2026 12:20
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.

1 participant