[IN TESTING — self-hosted 0.16.6, Kimi-K2.5 via Synthetic Direct] Four independent fixes that landed together on this stack: helpers.py — skip PendingApprovalError when the associated run is already cancelled or failed. Stale approvals from interrupted runs were blocking all subsequent messages on that conversation. Now checks run status before raising; falls back to raising on lookup failure (conservative). letta_agent_v3.py — use prompt_tokens not total_tokens for context window estimate. total_tokens inflated the estimate by including completion tokens, triggering premature compaction. This was causing context window resets mid- conversation and is the root of the token inflation bug (see #3242). openai_client.py (both build_request_data paths) — strip reasoning_content, reasoning_content_signature, redacted_reasoning_content, omitted_reasoning_content from message history before sending to inference backends. Fireworks and Synthetic Direct reject these fields with 422/400 errors. exclude_none handles None values but not actual text content from previous assistant turns. block_manager_git.py — skip DB write when block value is unchanged. Reduces unnecessary write amplification on every memfs sync cycle. memfs_client_base.py — remove redis_client= kwarg from GitOperations init. Dependency was removed upstream but the call site wasn't updated. Dockerfile / compose files — context window and config updates for 220k limit.
53 lines
1.8 KiB
YAML
53 lines
1.8 KiB
YAML
services:
|
|
letta_db:
|
|
image: pgvector/pgvector:0.8.1-pg15
|
|
networks:
|
|
default:
|
|
aliases:
|
|
- pgvector_db
|
|
- letta-db
|
|
environment:
|
|
- POSTGRES_USER=${LETTA_PG_USER:-letta}
|
|
- POSTGRES_PASSWORD=${LETTA_PG_PASSWORD:-letta}
|
|
- POSTGRES_DB=${LETTA_PG_DB:-letta}
|
|
volumes:
|
|
- ./.persist/pgdata-test:/var/lib/postgresql/data
|
|
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
ports:
|
|
- '5432:5432'
|
|
letta_server:
|
|
image: letta/letta:latest
|
|
hostname: letta
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: runtime
|
|
depends_on:
|
|
- letta_db
|
|
ports:
|
|
- '8083:8083'
|
|
- '8283:8283'
|
|
environment:
|
|
- LETTA_PG_DB=${LETTA_PG_DB:-letta}
|
|
- LETTA_PG_USER=${LETTA_PG_USER:-letta}
|
|
- LETTA_PG_PASSWORD=${LETTA_PG_PASSWORD:-letta}
|
|
- LETTA_PG_HOST=${LETTA_PG_HOST:-pgvector_db}
|
|
- LETTA_PG_PORT=${LETTA_PG_PORT:-5432}
|
|
- LETTA_PG_URI=${LETTA_PG_URI:-postgresql://${LETTA_PG_USER:-letta}:${LETTA_PG_PASSWORD:-letta}@${LETTA_PG_HOST:-pgvector_db}:${LETTA_PG_PORT:-5432}/${LETTA_PG_DB:-letta}}
|
|
- LETTA_DEBUG=True
|
|
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
|
- GROQ_API_KEY=${GROQ_API_KEY}
|
|
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
|
|
- OLLAMA_BASE_URL=${OLLAMA_BASE_URL}
|
|
- AZURE_API_KEY=${AZURE_API_KEY}
|
|
- AZURE_BASE_URL=${AZURE_BASE_URL}
|
|
- AZURE_API_VERSION=${AZURE_API_VERSION}
|
|
- GEMINI_API_KEY=${GEMINI_API_KEY}
|
|
- VLLM_API_BASE=${VLLM_API_BASE}
|
|
- OPENLLM_AUTH_TYPE=${OPENLLM_AUTH_TYPE}
|
|
- OPENLLM_API_KEY=${OPENLLM_API_KEY}
|
|
# Git safe.directory config (backup to Dockerfile fix for dubious ownership)
|
|
- GIT_CONFIG_COUNT=1
|
|
- GIT_CONFIG_KEY_0=safe.directory
|
|
- GIT_CONFIG_VALUE_0=*
|