Conversation
…provider. Update environment variables in .env.example and backend services to include Ollama-specific settings. Refactor model profile handling to accommodate Ollama profiles, ensuring proper enabling/disabling based on configuration. Add tests to validate Ollama profile behavior and integration with the runtime.
…structured execution timeline. Update chat orchestrator and service to include tool execution status and generation details in the response metadata. Refactor related tests to validate the integration of execution context, ensuring accurate logging of planner, tool, and generation events.
…execution metadata, including status and duration for planner, tool, and generation events. Update chat orchestrator and service to log orchestration timing and improve response metadata. Refactor tests to validate execution context handling and ensure accurate logging of execution details.
…s for execution context. Add clarifications on profile selection and capabilities handling, ensuring better visibility into orchestration timing and execution status. Update metadata for improved troubleshooting and UI visibility.
…api/chat/profiles to return enabled chat profile options, including descriptions. Update backend to handle chat profile requests and integrate with existing services. Enhance Discord bot commands to support profile selection, ensuring transparent user experience. Add tests for profile retrieval and command behavior, validating correct integration and error handling.
…iles. Revise descriptions for clarity and adjust maxInputTokens for several profiles. Introduce new Ollama profiles for Qwen and DeepSeek, along with a GPT-OSS profile for improved performance in general chat. Ensure all profiles are well-documented with links to relevant model documentation.
…loyment. Update environment variable handling in .env.example to include DISCORD_GUILD_IDS for comma-separated guild IDs, while maintaining DISCORD_GUILD_ID as a legacy option. Modify command deployment logic to iterate over configured guilds, ensuring explicit command rollout. Enhance runtime configuration validation and add tests for new guild ID handling.
…nce `applyChatCommandProfileChoices` to support configurable maximum attempts and retry delay. Update tests to validate retry behavior and ensure proper handling of profile fetch failures.
…ofile selection logic. Enhance logging for profile ID mismatches and clarify profile selection precedence. Update Discord bot command to include detailed response metadata and improve message formatting. Revise model profiles descriptions for clarity and consistency.
…ntroduce options for Ollama base URL, API key, and local inference settings. Implement logic to resolve provider overrides based on Ollama settings and normalize cloud base URLs. Add tests to validate Ollama provider mapping and environment variable application.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds Ollama provider support, a GET /api/chat/profiles endpoint and client, execution-timeline metadata (planner/tool/generation), planner/orchestrator telemetry and fail-open behavior, multi-guild Discord slash-command deployment with a new /chat command and profile-choice hydration, plus related config, contracts, runtime, UI, and tests. Changes
Sequence Diagram(s)sequenceDiagram
participant User as Discord User
participant Bot as Discord Bot
participant Backend as Backend API
participant Planner as Chat Planner
participant Generation as Generation Runtime
User->>Bot: /chat (prompt, optional profile/generation)
Bot->>Bot: Defer reply
Bot->>Backend: POST /api/chat (with orchestrationStartedAtMs & generation hint)
activate Backend
Backend->>Planner: planChat(request)
activate Planner
Planner-->>Backend: { plan, execution: { status, durationMs } }
deactivate Planner
Backend->>Backend: Resolve profile (request override or planner/default)
Backend->>Generation: generate(request with effective profile/model)
activate Generation
Generation-->>Backend: message + generation metadata (model,duration)
deactivate Generation
Backend->>Backend: Build execution timeline (planner → tool? → generation)
Backend-->>Bot: { action: 'message', message, metadata (execution,totalDurationMs) }
deactivate Backend
Bot->>User: Edit reply with message and execution summary
sequenceDiagram
participant Env as Env
participant Config as Runtime Config
participant Catalog as Model Catalog Parser
Env->>Config: buildRuntimeConfig(env)
activate Config
Config->>Catalog: parse default model-profiles
activate Catalog
Catalog-->>Config: parsedCatalog
deactivate Catalog
Config->>Config: compute provider availability (OPENAI_API_KEY, OLLAMA_BASE_URL, OLLAMA_LOCAL_INFERENCE_ENABLED)
Config->>Config: disable catalog entries whose provider is unavailable
Config-->>Env: runtimeConfig with filtered modelProfiles
deactivate Config
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ace mock. This change ensures that the test accurately reflects the expected behavior of the bot API when handling trace card requests.
…ration options. Introduce a new type for Ollama executor configuration, refactor related logic to resolve provider settings, and update tests to validate the mapping of Ollama configurations. This improves the handling of Ollama provider settings and ensures accurate environment variable application.
…' for improved caching behavior. This change ensures that chat profile responses are not cached, enhancing data freshness for users.
…etadata mutation during trace persistence. This change ensures that the ChatService computes totalDurationMs before metadata assembly, maintaining race-free trace persistence.
… Discord bot. Track successful and failed deployments, providing detailed logs for each guild. Abort startup if all deployments fail, ensuring robust command rollout across configured guilds.
…mporary directory cleanup. Ensure that YAML file writing and model profile section building are wrapped in try-finally blocks to prevent resource leaks. This enhances test reliability and maintains proper cleanup after execution.
This new utility function interprets common boolean representations ("1", "true", "yes") for environment configuration. It has been integrated into modelProfiles and ollama sections, replacing redundant implementations. This change streamlines boolean flag handling across the codebase.
…ntime configuration. This change enhances test accuracy by ensuring the profile ID reflects the current runtime settings instead of a hardcoded value.
…runcated descriptions. The change modifies the slice length to ensure proper formatting of the ellipsis, enhancing the clarity of the returned string.
Delivers end-to-end model-profile routing and visibility improvements across backend and Discord.
Adds structured execution timeline metadata (planner/tool/generation with status/duration).
Introduces
/api/chat/profilesand slash/chatper-request profile switching.Supports multi-guild command rollout and profile-choice fetch retries.
Extends provider config/runtime wiring for Ollama (including cloud/local handling and profile enablement rules).
This branch intentionally grouped the model-profile routing seam with
/chatoperator controls and execution visibility so we could validate the full request path (selection -> resolution -> execution -> surfaced metadata). This also helps close integration gaps discovered during testing (profile override precedence, provenance/footer parity, and Ollama cloud runtime wiring) before splitting follow-up hardening into later branches.Summary by CodeRabbit
New Features
/chatDiscord slash command with dynamic profile choices and generation hints (reasoning effort, verbosity).Documentation
Bug Fixes & Improvements