Commit Graph

12 Commits

Author SHA1 Message Date
db3807bff9 fix(rag): use ragManagedDbConfig.basic in corpus body; fix engine config PATCH with scaled→basic switch
The v1beta1 API uses ragManagedDbConfig (not vectorDbConfig) on the RagCorpus
resource itself. Omitting it causes the engine to default to Spanner. Also the
engine config PATCH must use {"ragManagedDbConfig":{"basic":{}}} with the
correct field name matching v1beta1 schema.
2026-05-24 19:23:30 +02:00
2838534296 fix(rag): always patch ragEngineConfig in us-central1; drop vectorDbConfig from corpus creation
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."
2026-05-24 19:19:12 +02:00
a2790be421 fix: create corpus via REST API directly, bypassing SDK backend_config bug
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.
2026-05-24 19:11:25 +02:00
2beb6a359d fix: drop backend_config from create_corpus — rely on pre-flight PATCH alone
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.
2026-05-24 19:04:31 +02:00
46b3c52607 fix: RagManagedDb() takes no arguments in SDK 1.153.1 2026-05-24 19:02:43 +02:00
582967a994 fix: use vector_db=RagManagedDb(tier=1) — correct field names for SDK 1.153.1
RagVectorDbConfig takes vector_db= not rag_managed_db=.
The db type is RagManagedDb, not RagManagedDbConfig.
2026-05-24 18:58:00 +02:00
ad8597f434 fix: use tier=1 int instead of RagManagedDbConfig.Tier.BASIC enum
The Tier enum is not available in the installed SDK version.
Use integer value 1 (BASIC) directly instead.
2026-05-24 18:44:22 +02:00
814dd89ca6 fix: explicitly set serverless RAG backend + improve error handling
- 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
2026-05-24 18:11:27 +02:00
60c7aff04d fix: remove backend_config — Serverless is default in us-central1 2026-05-24 16:15:32 +02:00
a5fd5f58e8 fix: switch RAG corpus to Serverless mode (RagManagedDb) in us-central1 2026-05-24 16:13:24 +02:00
09dcb4d1a2 feat: OPAX heavy mode + LLM-ruting oppdatert + RAG serverless fix\n\n- MASTERPLAN.md: ny LLM-RUTINGSSTRATEGI-seksjon med OPAX Heavy Mode\n- masterplan-summary.md: oppdatert med heavy mode-referanser\n- setup_corpus.py: fjernet backend_config (Serverless mode, ingen Spanner)\n- sesjon-logg: 2026-05-24_opax-heavy-mode-llm-ruting-rag.md 2026-05-24 14:07:26 +00:00
34ba75a4a2 feat: push all remaining files — agents/, docs/, architecture/, cloudbuild.yaml, README 2026-05-23 02:37:39 +02:00