fix: add LLM_API_URL and LLM_MODEL to portfolio deployment #1

Closed
rock wants to merge 1 commits from fix/add-llm-env-vars into main
Owner

Problem

Portfolio pod has OAuth credentials (AUTHENTIK_CLIENT_ID, CLIENT_SECRET, TOKEN_URL) but is missing LLM endpoint configuration. Chat API can successfully fetch JWT tokens but has no LLM service to call.

Root Cause

Environment variables missing from k8s deployment:

  • LLM_API_URL
  • LLM_MODEL

Solution

Inject LLM configuration via k8s deployment env vars:

Testing

  • Token fetch: portfolio-agent OAuth client_credentials flow works
  • DNS: api.riotpiao.com resolves (via homelab PR)
  • Auth: JWT issuer validation works (via homelab-frontend PR)

Files Changed

  • infra/portfolio/base/deployment.yaml (5 lines added: LLM env vars)

Dependencies

Depends on: homelab PR (DNS rewrite must be applied first)

After Merge

ArgoCD auto-syncs deployment with new env vars. Portfolio pod can now call LLM API with valid URL and model name.

## Problem Portfolio pod has OAuth credentials (AUTHENTIK_CLIENT_ID, CLIENT_SECRET, TOKEN_URL) but is missing LLM endpoint configuration. Chat API can successfully fetch JWT tokens but has no LLM service to call. ## Root Cause Environment variables missing from k8s deployment: - LLM_API_URL - LLM_MODEL ## Solution Inject LLM configuration via k8s deployment env vars: - LLM_API_URL: https://api.riotpiao.com/v1/chat/completions - LLM_MODEL: qwen2.5:3b-instruct ## Testing - ✅ Token fetch: portfolio-agent OAuth client_credentials flow works - ✅ DNS: api.riotpiao.com resolves (via homelab PR) - ✅ Auth: JWT issuer validation works (via homelab-frontend PR) ## Files Changed - infra/portfolio/base/deployment.yaml (5 lines added: LLM env vars) ## Dependencies Depends on: homelab PR (DNS rewrite must be applied first) ## After Merge ArgoCD auto-syncs deployment with new env vars. Portfolio pod can now call LLM API with valid URL and model name.
rock added 1 commit 2026-09-06 13:36:59 +00:00
Problem: Portfolio pod had OAuth credentials (AUTHENTIK_CLIENT_ID/SECRET)
but was missing LLM_API_URL and LLM_MODEL environment variables.
Chat API could fetch tokens but had no endpoint to call.

Solution: Inject LLM configuration via k8s deployment env vars:
- LLM_API_URL: https://api.riotpiao.com/v1/chat/completions
- LLM_MODEL: qwen2.5:3b-instruct

Testing:
- Token fetch: ✓ portfolio-agent OAuth works
- DNS: ✓ api.riotpiao.com resolves (CoreDNS rewrite)
- Auth: ⚠️  JWT issuer mismatch (portfolio-agent vs api-gw) — separate issue

Impact: Chat API endpoint can now attempt LLM calls with valid auth
rock closed this pull request 2026-09-07 06:21:10 +00:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rock/riotpiao.com#1