Skip to content

feat: default LiteLLM provider#1357

Merged
vitramir merged 2 commits intomainfrom
noa/issue-1356
Feb 28, 2026
Merged

feat: default LiteLLM provider#1357
vitramir merged 2 commits intomainfrom
noa/issue-1356

Conversation

@casey-brooks
Copy link
Contributor

Summary

  • default ConfigService to litellm with alias/duration/model parsing and legacy OPENAI warnings
  • feed LiteLLM provisioner from ConfigService and wire Helm chart/env defaults
  • update docs and tests for LiteLLM configuration and provisioning flow

Testing

  • pnpm exec eslint src/llm/provisioners/litellm.provisioner.ts src/core/services/config.service.ts tests/agent.auto-send.test.ts tests/agent.busy.wait.mode.test.ts tests/agent.error.termination.test.ts tests/agent.injectAfterTools.test.ts tests/agent.node.termination.autosend.test.ts tests/agent.systemPrompt.template.test.ts tests/agent.terminate.run.test.ts tests/config.service.fromEnv.test.ts tests/graph.fs.persistence.integration.test.ts tests/graph.module.di.smoke.test.ts tests/helpers/config.ts tests/litellm.provision.test.ts
  • pnpm exec vitest run tests/config.service.fromEnv.test.ts tests/litellm.provision.test.ts
  • pnpm exec vitest run tests/agent.auto-send.test.ts tests/agent.busy.wait.mode.test.ts tests/agent.error.termination.test.ts tests/agent.injectAfterTools.test.ts tests/agent.node.termination.autosend.test.ts tests/agent.systemPrompt.template.test.ts tests/agent.terminate.run.test.ts
  • pnpm exec vitest run tests/graph.fs.persistence.integration.test.ts tests/graph.module.di.smoke.test.ts

Notes

  • Full pnpm --filter @agyn/platform-server lint still fails because of pre-existing runnerGrpc.client unsafe assignment errors.
  • Full pnpm --filter @agyn/platform-server test requires live Postgres/Docker runner; targeted suites above cover the modified areas.

Resolves #1356

@casey-brooks casey-brooks requested a review from a team as a code owner February 28, 2026 11:25
@casey-brooks
Copy link
Contributor Author

Test & Lint Summary

  • pnpm exec eslint src/llm/provisioners/litellm.provisioner.ts src/core/services/config.service.ts tests/agent.auto-send.test.ts tests/agent.busy.wait.mode.test.ts tests/agent.error.termination.test.ts tests/agent.injectAfterTools.test.ts tests/agent.node.termination.autosend.test.ts tests/agent.systemPrompt.template.test.ts tests/agent.terminate.run.test.ts tests/config.service.fromEnv.test.ts tests/graph.fs.persistence.integration.test.ts tests/graph.module.di.smoke.test.ts tests/helpers/config.ts tests/litellm.provision.test.ts
  • pnpm exec vitest run tests/config.service.fromEnv.test.ts tests/litellm.provision.test.ts
  • pnpm exec vitest run tests/agent.auto-send.test.ts tests/agent.busy.wait.mode.test.ts tests/agent.error.termination.test.ts tests/agent.injectAfterTools.test.ts tests/agent.node.termination.autosend.test.ts tests/agent.systemPrompt.template.test.ts tests/agent.terminate.run.test.ts
  • pnpm exec vitest run tests/graph.fs.persistence.integration.test.ts tests/graph.module.di.smoke.test.ts

Notes:

  • Full

@agyn/platform-server@1.0.0 lint /workspace/platform/packages/platform-server
pnpm run prisma:generate && eslint .

@agyn/platform-server@1.0.0 prisma:generate /workspace/platform/packages/platform-server
prisma generate

Prisma schema loaded from prisma/schema.prisma

✔ Generated Prisma Client (v6.18.0) to ./../../node_modules/.pnpm/@prisma+client@6.18.0_prisma@6.18.0_typescript@5.8.3__typescript@5.8.3/node_modules/@prisma/client in 239ms

Start by importing your Prisma Client (See: https://pris.ly/d/importing-client)

Tip: Need your database queries to be 1000x faster? Accelerate offers you that and more: https://pris.ly/tip-2-accelerate still fails because of pre-existing unsafe assignment errors.

  • Full

@agyn/platform-server@1.0.0 test /workspace/platform/packages/platform-server
vitest run

RUN v3.2.4 /workspace/platform/packages/platform-server

stdout | tests/slack.config.schemas.test.ts > Slack static config schemas > SlackTriggerStaticConfigSchema: requires app_token and bot_token reference fields
[dotenv@17.2.2] injecting env (0) from .env -- tip: ⚙️ enable debug logging with { debug: true }

tests/slack.config.schemas.test.ts (2 tests) 1466ms
✓ Slack static config schemas > SendSlackMessageToolStaticConfigSchema: accepts xoxb- tokens or reference field 514ms
✓ Slack static config schemas > SlackTriggerStaticConfigSchema: requires app_token and bot_token reference fields 950ms
stdout | e2e/app.bootstrap.smoke.test.ts
[dotenv@17.2.2] injecting env (0) from .env -- tip: ⚙️ enable debug logging with { debug: true }

{"level":50,"time":1772277962954,"pid":37214,"hostname":"6216ec4a0d4e","req":{"id":"req-2","method":"GET","url":"/api/containers","query":{},"headers":{"host":"127.0.0.1:43363","connection":"keep-alive","accept":"/","accept-language":"*","sec-fetch-mode":"cors","user-agent":"undici","accept-encoding":"gzip, deflate"},"remoteAddress":"127.0.0.1","remotePort":40734},"res":{"statusCode":503,"headers":{}},"err":{"type":"Error","message":"failed with status code 503","stack":"Error: failed with status code 503\n at onResFinished (/workspace/platform/node_modules/.pnpm/pino-http@11.0.0/node_modules/pino-http/logger.js:115:39)\n at ServerResponse.onResponseComplete (/workspace/platform/node_modules/.pnpm/pino-http@11.0.0/node_modules/pino-http/logger.js:178:14)\n at ServerResponse.emit (node:events:536:35)\n at onFinish (node:_http_outgoing:1031:10)\n at callback (node:internal/streams/writable:766:21)\n at afterWrite (node:internal/streams/writable:710:5)\n at afterWriteTick (node:internal/streams/writable:696:10)\n at processTicksAndRejections (node:internal/process/task_queues:81:21)"},"responseTime":1,"msg":"request errored"}
e2e/app.bootstrap.smoke.test.ts (2 tests) 1624ms
✓ App bootstrap smoke test > initializes Nest application and wires critical dependencies 1527ms
stdout | e2e/bootstrap.di.test.ts
[dotenv@17.2.2] injecting env (0) from .env -- tip: ⚙️ load multiple .env files with { path: ['.env.local', '.env'] }

�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[NestFactory] �[39m�[32mStarting Nest application...�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[NcpsKeyService] �[39m�[32mNcpsKeyService disabled by config�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[GithubService] �[39m�[32mGithubService: integration disabled (no credentials)�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[InstanceLoader] �[39m�[32mCoreModule dependencies initialized�[39m�[38;5;3m +6ms�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[DockerWorkspaceEventsWatcher] �[39m�[32mDockerWorkspaceEventsWatcher: starting�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[DockerWorkspaceEventsWatcher] �[39m�[32mDockerWorkspaceEventsWatcher: subscribing to events�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[DockerWorkspaceEventsWatcher] �[39mObject(3) {
since: �[33m1772277965�[39m,
attempt: �[33m0�[39m,
initial: �[33mtrue�[39m
}
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[ContainerCleanupService] �[39m�[32mContainerCleanup: disabled by CONTAINERS_CLEANUP_ENABLED�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[InstanceLoader] �[39m�[32mEnvModule dependencies initialized�[39m�[38;5;3m +0ms�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[InstanceLoader] �[39m�[32mLoggerModule dependencies initialized�[39m�[38;5;3m +0ms�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[InstanceLoader] �[39m�[32mVaultModule dependencies initialized�[39m�[38;5;3m +3ms�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[InstanceLoader] �[39m�[32mLLMSettingsModule dependencies initialized�[39m�[38;5;3m +0ms�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[InstanceLoader] �[39m�[32mEventsModule dependencies initialized�[39m�[38;5;3m +0ms�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[InstanceLoader] �[39m�[32mUserProfileModule dependencies initialized�[39m�[38;5;3m +0ms�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[InstanceLoader] �[39m�[32mOnboardingModule dependencies initialized�[39m�[38;5;3m +0ms�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[InstanceLoader] �[39m�[32mInfraModule dependencies initialized�[39m�[38;5;3m +3ms�[39m
�[33m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[33m WARN�[39m �[38;5;3m[RunnerGrpcClient] �[39m�[33mRunner gRPC call failed�[39m
�[33m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[33m WARN�[39m �[38;5;3m[RunnerGrpcClient] �[39mObject(7) {
path: �[32m'/agynio.api.runner.v1.RunnerService/StreamEvents'�[39m,
grpcStatus: �[32m'UNAVAILABLE'�[39m,
grpcCode: �[33m14�[39m,
httpStatus: �[33m503�[39m,
errorCode: �[32m'runner_unavailable'�[39m,
message: �[32m'No connection established. Last error: Error: connect ECONNREFUSED 127.0.0.1:59999. Resolution note:'�[39m,
rawMessage: �[32m'No connection established. Last error: Error: connect ECONNREFUSED 127.0.0.1:59999. Resolution note: '�[39m
}
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[DockerWorkspaceEventsWatcher] �[39m�[32mDockerWorkspaceEventsWatcher: scheduling reconnect�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[DockerWorkspaceEventsWatcher] �[39mObject(2) {
delay: �[33m1000�[39m,
attempt: �[33m1�[39m
}
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[InstanceLoader] �[39m�[32mGraphCoreModule dependencies initialized�[39m�[38;5;3m +36ms�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[InstanceLoader] �[39m�[32mGatewayModule dependencies initialized�[39m�[38;5;3m +1ms�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[InstanceLoader] �[39m�[32mGraphDomainModule dependencies initialized�[39m�[38;5;3m +0ms�[39m
�[32m[Nest] 37237 - �[39m02/28/2026, 11:26:05 AM �[32m LOG�[39m �[38;5;3m[InstanceLoader] �[39m�[32mGraphApiModule dependencies initialized�[39m�[38;5;3m +1ms�[39m
/workspace/platform/packages/platform-server:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @agyn/platform-server@1.0.0 test: vitest run
Exit status 1 requires live Postgres/Docker runner; targeted suites above cover the modified areas.

@casey-brooks
Copy link
Contributor Author

Test & Lint Summary

  • pnpm exec eslint src/llm/provisioners/litellm.provisioner.ts src/core/services/config.service.ts tests/agent.auto-send.test.ts tests/agent.busy.wait.mode.test.ts tests/agent.error.termination.test.ts tests/agent.injectAfterTools.test.ts tests/agent.node.termination.autosend.test.ts tests/agent.systemPrompt.template.test.ts tests/agent.terminate.run.test.ts tests/config.service.fromEnv.test.ts tests/graph.fs.persistence.integration.test.ts tests/graph.module.di.smoke.test.ts tests/helpers/config.ts tests/litellm.provision.test.ts
  • pnpm exec vitest run tests/config.service.fromEnv.test.ts tests/litellm.provision.test.ts
  • pnpm exec vitest run tests/agent.auto-send.test.ts tests/agent.busy.wait.mode.test.ts tests/agent.error.termination.test.ts tests/agent.injectAfterTools.test.ts tests/agent.node.termination.autosend.test.ts tests/agent.systemPrompt.template.test.ts tests/agent.terminate.run.test.ts
  • pnpm exec vitest run tests/graph.fs.persistence.integration.test.ts tests/graph.module.di.smoke.test.ts

Notes:

  • Full pnpm --filter @agyn/platform-server lint still fails because of pre-existing runnerGrpc.client unsafe assignment errors.
  • Full pnpm --filter @agyn/platform-server test requires live Postgres/Docker runner; targeted suites above cover the modified areas.

Copy link
Contributor

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: found a major configuration-invariant issue in ConfigService that should fail loudly instead of silently defaulting on invalid provider values.

@casey-brooks
Copy link
Contributor Author

Test & Lint Summary (update)

  • pnpm exec eslint src/core/services/config.service.ts tests/config.service.fromEnv.test.ts
  • pnpm exec vitest run tests/config.service.fromEnv.test.ts tests/litellm.provision.test.ts

Copy link
Contributor

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review complete. The previously requested invariant fix is in place: unsupported LLM_PROVIDER values now fail fast, tests cover the invalid-provider path, and docs were updated to match behavior.

@vitramir vitramir added this pull request to the merge queue Feb 28, 2026
Merged via the queue into main with commit 6313005 Feb 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

platform-server: remove OPENAI_API_KEY dependency; make LiteLLM the default and first-class provider

3 participants