Skip to content

Commit 8ea2335

Browse files
committed
docs: update doc for vertex AI inference
Signed-off-by: Philippe Martin <phmartin@redhat.com>
1 parent 8b192b1 commit 8ea2335

1 file changed

Lines changed: 52 additions & 18 deletions

File tree

README.md

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -601,18 +601,36 @@ $ openshell-image-builder \
601601
--with-agent-settings \
602602
sandbox_image:claude_vertexai
603603

604-
# change value of ANTHROPIC_VERTEX_PROJECT_ID and CLOUD_ML_REGION
605-
# also change source paths for mounts
606-
# NOTE: gcloud credentials are not protected with this method
604+
$ openshell settings set \
605+
--global \
606+
--key providers_v2_enabled \
607+
--value true \
608+
--yes
609+
610+
# change value of VERTEX_AI_PROJECT_ID and VERTEX_AI_REGION
611+
$ openshell provider create \
612+
--name vertex-local \
613+
--type google-vertex-ai \
614+
--from-gcloud-adc \
615+
--config VERTEX_AI_PROJECT_ID=my-gcp-project \
616+
--config VERTEX_AI_REGION=global
617+
618+
# change with your preferred model
619+
$ openshell inference set \
620+
--provider vertex-local \
621+
--model claude-sonnet-4-6
622+
623+
# Change source paths for mounts
607624
$ openshell sandbox create \
608625
--from sandbox_image:claude_vertexai \
609-
--env CLAUDE_CODE_USE_VERTEX=1 \
610-
--env ANTHROPIC_VERTEX_PROJECT_ID=my-gcp-project \
611-
--env CLOUD_ML_REGION=global \
612-
--driver-config-json '{"podman":{"mounts":[{"type":"bind","source":"/path/to/your/sources","target":"/sandbox/work","read_only":false},{"type":"bind","source":"/path/to/.config/gcloud/application_default_credentials.json","target":"/sandbox/.config/gcloud/application_default_credentials.json","read_only":true}]}}' \
626+
--provider vertex-local \
627+
--env ANTHROPIC_BASE_URL="https://inference.local" \
628+
--env ANTHROPIC_API_KEY=unused \
629+
--env CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 \
630+
--driver-config-json '{"podman":{"mounts":[{"type":"bind","source":"/path/to/your/sources","target":"/sandbox/work","read_only":false}]}}' \
613631
--name claude_vertexai_sandbox \
614632
--no-auto-providers \
615-
-- claude
633+
-- bash -c 'cd /sandbox/work && claude --bare'
616634
```
617635

618636
### OpenCode agent + Ollama (local models)
@@ -704,18 +722,34 @@ $ openshell-image-builder \
704722
--with-agent-settings \
705723
sandbox_image:opencode_vertexai
706724

707-
# change value of GOOGLE_CLOUD_PROJECT and VERTEX_LOCATION
708-
# also change source paths for mounts
709-
# NOTE: gcloud credentials are not protected with this method
725+
$ openshell settings set \
726+
--global \
727+
--key providers_v2_enabled \
728+
--value true \
729+
--yes
730+
731+
# change value of VERTEX_AI_PROJECT_ID and VERTEX_AI_REGION
732+
$ openshell provider create \
733+
--name vertex-local \
734+
--type google-vertex-ai \
735+
--from-gcloud-adc \
736+
--config VERTEX_AI_PROJECT_ID=my-gcp-project \
737+
--config VERTEX_AI_REGION=global
738+
739+
# change with your preferred model
740+
$ openshell inference set \
741+
--provider vertex-local \
742+
--model claude-sonnet-4-6
743+
744+
# Change source paths for mounts
710745
$ openshell sandbox create \
711746
--from sandbox_image:opencode_vertexai \
712-
--env GOOGLE_APPLICATION_CREDENTIALS=/sandbox/.config/gcloud/application_default_credentials.json \
713-
--env GOOGLE_CLOUD_PROJECT=my-gcp-project \
714-
--env VERTEX_LOCATION=global \
715-
--driver-config-json '{"podman":{"mounts":[{"type":"bind","source":"/path/to/your/sources","target":"/sandbox/work","read_only":false},{"type":"bind","source":"/path/to/.config/gcloud/application_default_credentials.json","target":"/sandbox/.config/gcloud/application_default_credentials.json","read_only":true}]}}' \
747+
--provider vertex-local \
748+
--env ANTHROPIC_BASE_URL="https://inference.local/v1" \
749+
--env ANTHROPIC_API_KEY=unused \
750+
--env CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 \
751+
--driver-config-json '{"podman":{"mounts":[{"type":"bind","source":"/path/to/your/sources","target":"/sandbox/work","read_only":false}]}}' \
716752
--name opencode_vertexai_sandbox \
717753
--no-auto-providers \
718-
-- opencode
719-
720-
# select a model with /models
754+
-- bash -c 'cd /sandbox/work && opencode'
721755
```

0 commit comments

Comments
 (0)