Skip to content

Expand model providers and harden the runtime#17

Merged
JaviChulvi merged 27 commits into
mainfrom
feat/runtime-provider-hardening
Jul 12, 2026
Merged

Expand model providers and harden the runtime#17
JaviChulvi merged 27 commits into
mainfrom
feat/runtime-provider-hardening

Conversation

@JaviChulvi

Copy link
Copy Markdown
Owner

Summary

  • add first-class OpenAI-compatible, OpenRouter, Anthropic, Bedrock, and Gemini providers alongside OpenAI, DeepSeek, and local
  • centralize provider profiles, capabilities, structured-action parsing, error classification, fallback accounting, and context budgeting
  • add native async provider execution and cancellation-safe fallback behavior while preserving sync-only custom-client compatibility
  • harden shell execution, sensitive file reads, durable memory, provider diagnostics, and configuration redaction
  • add versioned trace replay, deterministic offline evaluations, package-wide type checking, and provider setup documentation

Why

Provider integration and action handling had grown across provider-specific paths, which made fallback behavior, async execution, capability checks, and extension compatibility harder to reason about. Safety checks also needed stronger runtime enforcement around shell processes, file reads, memory persistence, and diagnostic output.

This change keeps provider details inside the LLM boundary, makes the shared orchestration path explicit, and preserves the original custom-provider factory contract.

Provider configuration

The implementation follows the existing Chulk environment model and documents the exact precedence for:

  • CHULK_LLM_PROVIDER, CHULK_MODEL, and CHULK_LLM_FALLBACK_PROVIDERS
  • OpenAI, DeepSeek, local, OpenRouter, Anthropic, Bedrock, and Gemini key aliases
  • provider-specific base URLs, including explicit Bedrock and generic OpenAI-compatible endpoints
  • individual SDK extras and the aggregate providers extra

Validation

  • python -m pytest -q — 677 passed
  • python -m ruff check chulk examples scripts
  • python -m mypy chulk typing_tests — 95 source files
  • python -m compileall -q chulk examples scripts
  • python scripts/check_docs.py
  • clean wheel build and clean-virtualenv installation smoke
  • credential-free SDK quickstart and repository-review example

Provider adapter tests use injected fake SDK clients and make no live billable calls. Live keys, endpoints, model identifiers, account entitlements, quotas, and billing still require owner validation before merge.

@JaviChulvi JaviChulvi force-pushed the feat/runtime-provider-hardening branch from 315c7e2 to 78fc3fd Compare July 12, 2026 21:52
@JaviChulvi JaviChulvi marked this pull request as ready for review July 12, 2026 22:37
@JaviChulvi JaviChulvi merged commit 135bb37 into main Jul 12, 2026
10 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.

1 participant