Javi

AI: configuring cloud against GCP

Sep 24th, 2025 (edited)
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. * Model garden
  2. * Search claude 4
  3. * Activate VertexAI
  4. * Accept everything
  5.  
  6. ```bash
  7. gcloud init
  8. gcloud auth login --update-adc
  9. ```
  10.  
  11. ```bash
  12. cat << EOF > ~/.claude/settings.json
  13. {
  14. "permissions": {
  15. "allow": [
  16. "Bash(npm run lint)",
  17. "Bash(npm run test)",
  18. "Read(~/.zshrc)"
  19. ],
  20. "deny": [
  21. ]
  22. },
  23. "env": {
  24. "CLAUDE_CODE_USE_VERTEX": 1,
  25. "CLOUD_ML_REGION": "europe-west1",
  26. "ANTHROPIC_VERTEX_PROJECT_ID": ""
  27. }
  28. }
  29. EOF
  30. ```
  31.  
  32. ```bash
  33. Ah! espera, se me olvidaba:
  34.  
  35.  
  36.  
  37.  
  38.  
  39. cat << EOF > env.sh​
  40. # Enable Vertex AI integration
  41. CLAUDE_CODE_USE_VERTEX=1
  42. CLOUD_ML_REGION=global
  43. ANTHROPIC_VERTEX_PROJECT_ID=xxx-xx-xx-xx-xxxx
  44.  
  45. # Optional: Disable prompt caching if needed
  46. DISABLE_PROMPT_CACHING=0
  47.  
  48. # When CLOUD_ML_REGION=global, override region for unsupported models
  49. VERTEX_REGION_CLAUDE_3_5_HAIKU=europe-west1
  50.  
  51. # Optional: Override regions for other specific models
  52. VERTEX_REGION_CLAUDE_3_5_SONNET=europe-west1
  53. VERTEX_REGION_CLAUDE_3_7_SONNET=europe-west1
  54. VERTEX_REGION_CLAUDE_4_0_OPUS=europe-west1
  55. VERTEX_REGION_CLAUDE_4_0_SONNET=europe-west1
  56. VERTEX_REGION_CLAUDE_4_1_OPUS=europe-west1
  57. EOF
  58. ```
  59.  
  60. ```bash
  61. source env.sh
  62. ```
  63.  
  64. ```bash
  65. npm install -g @anthropic-ai/claude-code
  66. ```
  67.  
  68.  
Advertisement
Add Comment
Please, Sign In to add comment