Two root causes fixed:
1. ragEngineConfig is a project-level control-plane endpoint that only exists in
us-central1. Patching it against europe-west1 (or any other region) returns
'Invalid endpoint name'. We now always use us-central1 for the config PATCH
regardless of RAG_LOCATION.
2. Including vectorDbConfig.ragManagedDb in the corpus creation payload explicitly
requests Spanner mode, which is allowlist-restricted for new projects. Omitting
vectorDbConfig entirely lets the engine honour the project-level 'basic' config
and use serverless mode — the correct approach per Google docs."
SDK 1.153.1 always defaults to Spanner when backend_config is omitted,
and crashes when it's provided. Use REST POST directly with
vectorDbConfig.ragManagedDb set to force serverless.
SDK 1.153.1 has a bug in set_backend_config where it calls .CopyFrom()
on RagManagedDb which is not a real protobuf message.
The project-level ragEngineConfig PATCH already sets basic tier,
so passing backend_config is unnecessary and breaks corpus creation.
- Pass RagVectorDbConfig with RagManagedDbConfig basic tier explicitly
to avoid Spanner allowlist errors on new projects
- Add pre-flight ensure_serverless_engine_config() via REST PATCH
- Cleaner error messages with actionable hints
- Idempotent: skips creation if corpus already exists
- Add agents/core-logic/Dockerfile.base with heavy deps pre-baked
- Update agents/core-logic/Dockerfile to build FROM base image
- Update cloudbuild.yaml with step to build/push base (manual only)
- Typical deploy time reduction: ~3 min → ~30 sec