test(config): add migration tests for litellm provider
Some checks failed
CI / build-and-test (push) Failing after -32m22s

* Implement tests for migrating configuration from v1 to v2 for the litellm provider.
* Validate the structure and values of the migrated configuration.
* Ensure migration rejects newer versions of the configuration.
fix(validate): enhance AI provider validation logic
* Consolidate provider validation into a dedicated method.
* Ensure at least one provider is specified and validate its type.
* Check for required fields based on provider type.
fix(mcpserver): update tool set to use new enrichment tool
* Replace RetryMetadataTool with RetryEnrichmentTool in the ToolSet.
fix(tools): refactor tools to use embedding and metadata runners
* Update tools to utilize EmbeddingRunner and MetadataRunner instead of Provider.
* Adjust method calls to align with the new runner interfaces.
This commit is contained in:
2026-04-21 21:14:28 +02:00
parent 532d1560a3
commit 14e218d784
39 changed files with 2062 additions and 901 deletions

View File

@@ -1,3 +1,5 @@
version: 2
server:
host: "0.0.0.0"
port: 8080
@@ -27,7 +29,7 @@ auth:
- id: "oauth-client"
client_id: ""
client_secret: ""
description: "used when auth.mode=oauth_client_credentials"
description: "optional OAuth client credentials"
database:
url: "postgres://postgres:postgres@localhost:5432/amcs?sslmode=disable"
@@ -37,33 +39,58 @@ database:
max_conn_idle_time: "10m"
ai:
provider: "litellm"
providers:
default:
type: "litellm"
base_url: "http://localhost:4000/v1"
api_key: "replace-me"
request_headers: {}
ollama_local:
type: "ollama"
base_url: "http://localhost:11434/v1"
api_key: "ollama"
request_headers: {}
openrouter:
type: "openrouter"
base_url: "https://openrouter.ai/api/v1"
api_key: "replace-me"
app_name: "amcs"
site_url: ""
request_headers: {}
embeddings:
model: "openai/text-embedding-3-small"
dimensions: 1536
primary:
provider: "default"
model: "openai/text-embedding-3-small"
fallbacks:
- provider: "ollama_local"
model: "nomic-embed-text"
metadata:
model: "gpt-4o-mini"
fallback_models: []
temperature: 0.1
log_conversations: false
litellm:
base_url: "http://localhost:4000/v1"
api_key: "replace-me"
use_responses_api: false
request_headers: {}
embedding_model: "openrouter/openai/text-embedding-3-small"
metadata_model: "gpt-4o-mini"
fallback_metadata_models: []
ollama:
base_url: "http://localhost:11434/v1"
api_key: "ollama"
request_headers: {}
openrouter:
base_url: "https://openrouter.ai/api/v1"
api_key: ""
app_name: "amcs"
site_url: ""
extra_headers: {}
timeout: "10s"
primary:
provider: "default"
model: "gpt-4o-mini"
fallbacks:
- provider: "openrouter"
model: "openai/gpt-4.1-mini"
# Optional overrides for background jobs (backfill_embeddings,
# retry_failed_metadata, reparse_thought_metadata).
background:
embeddings:
primary:
provider: "default"
model: "openai/text-embedding-3-small"
metadata:
primary:
provider: "default"
model: "gpt-4o-mini"
capture:
source: "mcp"