fix: upgrade model claude-opus-4-6 → claude-opus-4-7, add 2500 NOK budget cap
This commit is contained in:
parent
e2c2b0449b
commit
d44d6a11a7
|
|
@ -1,6 +1,6 @@
|
||||||
# GEMINI.md — OSVauco / OPAX
|
# GEMINI.md — OSVauco / OPAX
|
||||||
|
|
||||||
> Claude Opus 4.6 · Vertex AI EU endpoint · Nemotron session protocol · HITL-safe
|
> Claude Opus 4.7 · Vertex AI EU endpoint · Nemotron session protocol · HITL-safe
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -16,8 +16,10 @@ GCP_REGION: europe-west1
|
||||||
GCP_VERTEX_LOC: eu
|
GCP_VERTEX_LOC: eu
|
||||||
CLOUD_RUN_SVC: osvauco-agent
|
CLOUD_RUN_SVC: osvauco-agent
|
||||||
ARTIFACT_REPO: gcr.io/propane-will-491900-m5
|
ARTIFACT_REPO: gcr.io/propane-will-491900-m5
|
||||||
MODEL: claude-opus-4-6@20260301
|
MODEL: claude-opus-4-7@20260301
|
||||||
MODEL_PROVIDER: Vertex AI (Anthropic Claude via Google Cloud)
|
MODEL_PROVIDER: Vertex AI (Anthropic Claude via Google Cloud)
|
||||||
|
MODEL_COST: ~2 NOK per 1M tokens (input)
|
||||||
|
BUDGET_CAP: 2500 NOK intern grense — spør Chris om +1000 NOK ved behov
|
||||||
OPERATOR: Chris Christiansen (chris.christiansen@vauco.no)
|
OPERATOR: Chris Christiansen (chris.christiansen@vauco.no)
|
||||||
OPERATOR_ROLE: Eier, arkitekt og primær operatør av OSVauco / OS-Vauco
|
OPERATOR_ROLE: Eier, arkitekt og primær operatør av OSVauco / OS-Vauco
|
||||||
```
|
```
|
||||||
|
|
@ -26,13 +28,14 @@ OPERATOR_ROLE: Eier, arkitekt og primær operatør av OSVauco / OS-Vauco
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Modell: Claude Opus 4.6 via Vertex AI
|
## Modell: Claude Opus 4.7 via Vertex AI
|
||||||
|
|
||||||
Denne agenten kjøres med **Claude Opus 4.6** tilgjengelig via Vertex AI EU multi-region endpoint.
|
Denne agenten kjøres med **Claude Opus 4.7** tilgjengelig via Vertex AI EU multi-region endpoint.
|
||||||
|
|
||||||
- Data forblir innenfor EU-grensen (GDPR-compliant) [cite:76]
|
- Data forblir innenfor EU-grensen (GDPR-compliant)
|
||||||
- Ingen separat Anthropic API-nøkkel — billing via eksisterende GCP-konto
|
- Ingen separat Anthropic API-nøkkel — billing via eksisterende GCP-konto
|
||||||
- EU endpoint auto-routes internt mellom europeiske regioner for kapasitet
|
- EU endpoint auto-routes internt mellom europeiske regioner for kapasitet
|
||||||
|
- Intern budsjett-cap: **2 500 NOK** — ved behov for mer, spør Chris eksplisitt om +1 000 NOK
|
||||||
|
|
||||||
```python
|
```python
|
||||||
# Korrekt initialisering
|
# Korrekt initialisering
|
||||||
|
|
@ -44,16 +47,13 @@ client = anthropic.AnthropicVertex(
|
||||||
)
|
)
|
||||||
|
|
||||||
response = client.messages.create(
|
response = client.messages.create(
|
||||||
model="claude-opus-4-6@20260301",
|
model="claude-opus-4-7@20260301",
|
||||||
max_tokens=8192,
|
max_tokens=8192,
|
||||||
messages=[{"role": "user", "content": "..."}]
|
messages=[{"role": "user", "content": "..."}]
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Aktiver model i Vertex AI Model Garden (kun første gang)
|
|
||||||
# Console → Vertex AI → Model Garden → søk "Claude Opus" → Enable
|
|
||||||
|
|
||||||
# Auth
|
# Auth
|
||||||
gcloud auth application-default login --project=propane-will-491900-m5
|
gcloud auth application-default login --project=propane-will-491900-m5
|
||||||
```
|
```
|
||||||
|
|
@ -151,12 +151,10 @@ NÅR noe feiler:
|
||||||
|
|
||||||
NÅR du er usikker på state:
|
NÅR du er usikker på state:
|
||||||
```bash
|
```bash
|
||||||
# Sjekk hva som faktisk kjører
|
|
||||||
gcloud run services describe $CLOUD_RUN_SVC \
|
gcloud run services describe $CLOUD_RUN_SVC \
|
||||||
--project=$GCP_PROJECT --region=$GCP_REGION \
|
--project=$GCP_PROJECT --region=$GCP_REGION \
|
||||||
--format="yaml(status,spec.template.spec.containers)"
|
--format="yaml(status,spec.template.spec.containers)"
|
||||||
|
|
||||||
# Sjekk siste image som ble bygget
|
|
||||||
gcloud artifacts docker images list \
|
gcloud artifacts docker images list \
|
||||||
gcr.io/$GCP_PROJECT/osvauco-agent \
|
gcr.io/$GCP_PROJECT/osvauco-agent \
|
||||||
--project=$GCP_PROJECT \
|
--project=$GCP_PROJECT \
|
||||||
|
|
@ -183,17 +181,15 @@ gcloud artifacts docker images list \
|
||||||
|
|
||||||
Etter enhver endring:
|
Etter enhver endring:
|
||||||
```bash
|
```bash
|
||||||
# Bekreft at ny revisjon er aktiv
|
|
||||||
gcloud run revisions list \
|
gcloud run revisions list \
|
||||||
--service=$CLOUD_RUN_SVC \
|
--service=$CLOUD_RUN_SVC \
|
||||||
--project=$GCP_PROJECT \
|
--project=$GCP_PROJECT \
|
||||||
--region=$GCP_REGION \
|
--region=$GCP_REGION \
|
||||||
--limit=3
|
--limit=3
|
||||||
|
|
||||||
# Bekreft at endepunktet svarer
|
|
||||||
curl -s -o /dev/null -w "%{http_code}" \
|
curl -s -o /dev/null -w "%{http_code}" \
|
||||||
-H "Authorization: Bearer $(gcloud auth print-identity-token)" \
|
-H "Authorization: Bearer $(gcloud auth print-identity-token)" \
|
||||||
https://osvauco-agent-357036551735.us-central1.run.app/health
|
https://opax.vauco.no/health
|
||||||
```
|
```
|
||||||
|
|
||||||
### Regel 5: Bruk strukturerte observasjoner
|
### Regel 5: Bruk strukturerte observasjoner
|
||||||
|
|
@ -212,7 +208,7 @@ VERIFY: [kommando for å bekrefte fix]
|
||||||
|
|
||||||
### BOOT
|
### BOOT
|
||||||
- Read `docs/AGENT_RULEBOOK.md`, `docs/VAUCO_OS_ROADMAP.md`, and `docs/OSVAUCO_OPAX_SESSION_LOG.md`.
|
- Read `docs/AGENT_RULEBOOK.md`, `docs/VAUCO_OS_ROADMAP.md`, and `docs/OSVAUCO_OPAX_SESSION_LOG.md`.
|
||||||
- Print LOCKED DEFINITIONS (`MCP_NAME`, `MCP_PROTOCOL`, `HUB_URL`, `ROOT_DOMAIN`, `GCP_PROJECT`, `MODEL`, `OPERATOR`).
|
- Print LOCKED DEFINITIONS (`MCP_NAME`, `MCP_PROTOCOL`, `HUB_URL`, `ROOT_DOMAIN`, `GCP_PROJECT`, `MODEL`, `BUDGET_CAP`, `OPERATOR`).
|
||||||
- Print the last `## NESTE OPPGAVE` block found in the session log.
|
- Print the last `## NESTE OPPGAVE` block found in the session log.
|
||||||
- If no NESTE OPPGAVE found → warn and read ROADMAP NOW section instead.
|
- If no NESTE OPPGAVE found → warn and read ROADMAP NOW section instead.
|
||||||
- Sjekk gjeldende GCP auth: `gcloud auth list` og `gcloud config get-value project`
|
- Sjekk gjeldende GCP auth: `gcloud auth list` og `gcloud config get-value project`
|
||||||
|
|
@ -250,7 +246,6 @@ VERIFY: [kommando for å bekrefte fix]
|
||||||
|
|
||||||
### NEXT
|
### NEXT
|
||||||
- At the next session start, read `## NESTE OPPGAVE` before doing anything else.
|
- At the next session start, read `## NESTE OPPGAVE` before doing anything else.
|
||||||
- The boot script reads the last NESTE OPPGAVE automatically — keep it updated.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -261,13 +256,14 @@ VERIFY: [kommando for å bekrefte fix]
|
||||||
3. **Never batch unrelated edits** in a single EXECUTE step.
|
3. **Never batch unrelated edits** in a single EXECUTE step.
|
||||||
4. **OPAX (`opax.vauco.no`) is management plane only** — it never receives raw patient data.
|
4. **OPAX (`opax.vauco.no`) is management plane only** — it never receives raw patient data.
|
||||||
5. **Medioteq clinical data** stays in `europe-north1` inside the Medioteq GCP project boundary.
|
5. **Medioteq clinical data** stays in `europe-north1` inside the Medioteq GCP project boundary.
|
||||||
6. **Deploy `clinical-mcp` and `clinical-orchestrator`** to the Medioteq project (`--project=<MEDIOTEQ_PROJECT_ID>`), never the Vauco project.
|
6. **Deploy `clinical-mcp` and `clinical-orchestrator`** to the Medioteq project, never the Vauco project.
|
||||||
7. **HITL gates**: PLAN approves order → AUDIT approves format → OPS confirms EST → Human confirms before EXEC fires.
|
7. **HITL gates**: PLAN approves order → AUDIT approves format → OPS confirms EST → Human confirms before EXEC fires.
|
||||||
8. **Aldri søk på nett for å diagnostisere feil du kan lese i loggene.**
|
8. **Aldri søk på nett for å diagnostisere feil du kan lese i loggene.**
|
||||||
9. **Aldri anta at noe virker — verifiser alltid med en faktisk kommando.**
|
9. **Aldri anta at noe virker — verifiser alltid med en faktisk kommando.**
|
||||||
10. **Aldri gjett på koden — les den.** Du er i repoet. Bruk `cat`, `grep`, `git diff`.
|
10. **Aldri gjett på koden — les den.** Du er i repoet. Bruk `cat`, `grep`, `git diff`.
|
||||||
11. **Aldri skriv .env fra .env.example** — se Kritiske fil-sikkerhetsregler.
|
11. **Aldri skriv .env fra .env.example** — se Kritiske fil-sikkerhetsregler.
|
||||||
12. **Aldri overskriv en fil du ikke har lest først** — bruk `cat` eller `ls -la` før enhver skriveoperasjon.
|
12. **Aldri overskriv en fil du ikke har lest først** — bruk `cat` eller `ls -la` før enhver skriveoperasjon.
|
||||||
|
13. **Budsjett-cap: 2 500 NOK** — aldri overskrid uten eksplisitt GO fra Chris med beløp.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -325,9 +321,9 @@ gcloud iap web get-iam-policy \
|
||||||
### 🔴 Claude / Vertex AI-feil
|
### 🔴 Claude / Vertex AI-feil
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Test Claude Opus 4.6 via Vertex EU endpoint
|
# Test Claude Opus 4.7 via Vertex EU endpoint
|
||||||
curl -X POST \
|
curl -X POST \
|
||||||
"https://eu-aiplatform.googleapis.com/v1/projects/propane-will-491900-m5/locations/eu/publishers/anthropic/models/claude-opus-4-6@20260301:rawPredict" \
|
"https://eu-aiplatform.googleapis.com/v1/projects/propane-will-491900-m5/locations/eu/publishers/anthropic/models/claude-opus-4-7@20260301:rawPredict" \
|
||||||
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
|
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{
|
-d '{
|
||||||
|
|
@ -354,32 +350,6 @@ find ~ -name ".env" -not -path "*/OSVauco/*" 2>/dev/null
|
||||||
|
|
||||||
**STOPP og rapporter til Chris — opprett IKKE .env fra .env.example.**
|
**STOPP og rapporter til Chris — opprett IKKE .env fra .env.example.**
|
||||||
|
|
||||||
### Prioritert diagnose-rekkefølge
|
|
||||||
|
|
||||||
```
|
|
||||||
FEIL OPPDAGET
|
|
||||||
│
|
|
||||||
▼
|
|
||||||
1. Les loggene (build / runtime / HTTP response)
|
|
||||||
│
|
|
||||||
▼
|
|
||||||
2. Identifiser hvilken linje/steg som feilet
|
|
||||||
│
|
|
||||||
▼
|
|
||||||
3. Les den aktuelle filen i repoet
|
|
||||||
│
|
|
||||||
▼
|
|
||||||
4. Formuler rot-årsak med OBSERVASJON/ROT-ÅRSAK/FIX
|
|
||||||
│
|
|
||||||
▼
|
|
||||||
5. PLAN → HITL → EXECUTE → VERIFY
|
|
||||||
│
|
|
||||||
▼
|
|
||||||
ALDRI: Søk på nett som første steg
|
|
||||||
ALDRI: Gjett og prøv uten å lese loggene
|
|
||||||
ALDRI: Opprett .env fra template
|
|
||||||
```
|
|
||||||
|
|
||||||
### Diagnoseoversikt
|
### Diagnoseoversikt
|
||||||
|
|
||||||
| Situasjon | Gjør DETTE | IKKE dette |
|
| Situasjon | Gjør DETTE | IKKE dette |
|
||||||
|
|
@ -398,20 +368,14 @@ ALDRI: Opprett .env fra template
|
||||||
## GCP-konvensjoner for dette prosjektet
|
## GCP-konvensjoner for dette prosjektet
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Alltid bruk eksplisitt prosjekt og region
|
|
||||||
--project=propane-will-491900-m5
|
--project=propane-will-491900-m5
|
||||||
--region=europe-west1
|
--region=europe-west1
|
||||||
|
|
||||||
# Cloud Run service
|
|
||||||
CLOUD_RUN_SVC=osvauco-agent
|
CLOUD_RUN_SVC=osvauco-agent
|
||||||
|
|
||||||
# Artifact Registry
|
|
||||||
IMAGE=gcr.io/propane-will-491900-m5/osvauco-agent
|
IMAGE=gcr.io/propane-will-491900-m5/osvauco-agent
|
||||||
|
|
||||||
# Cloud Build
|
|
||||||
gcloud builds submit --config=cloudbuild.yaml --project=propane-will-491900-m5
|
gcloud builds submit --config=cloudbuild.yaml --project=propane-will-491900-m5
|
||||||
|
|
||||||
# Deploy manuelt
|
|
||||||
gcloud run deploy osvauco-agent \
|
gcloud run deploy osvauco-agent \
|
||||||
--image=$IMAGE:latest \
|
--image=$IMAGE:latest \
|
||||||
--project=propane-will-491900-m5 \
|
--project=propane-will-491900-m5 \
|
||||||
|
|
@ -435,7 +399,7 @@ Auth: Google OAuth now. BankID on `-os` later (Medioteq first).
|
||||||
|
|
||||||
## Standard Boot Prompt
|
## Standard Boot Prompt
|
||||||
|
|
||||||
Lim inn dette ved start av HVER sesjon i Gemini TUI:
|
Lim inn dette ved start av HVER sesjon:
|
||||||
|
|
||||||
```
|
```
|
||||||
BOOT: Read docs/AGENT_RULEBOOK.md, docs/VAUCO_OS_ROADMAP.md, docs/OSVAUCO_OPAX_SESSION_LOG.md.
|
BOOT: Read docs/AGENT_RULEBOOK.md, docs/VAUCO_OS_ROADMAP.md, docs/OSVAUCO_OPAX_SESSION_LOG.md.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user