Add endpoints to support ai chat interactions

- Add endpoints to talk to different ai services.
- Add config for URLS
- make feature flag for ai chat service that will help to manage feature across different environments.
<think>
PR Context:
- Title: feat(ai): add endpoints to chat with ai service
- Merged: 2025-07-16T20:33:11Z
- Files changed: 26 files
- Commits: 23 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
The PR does the following actions
- Adds endpoints to talk to ai services, particularly to n8n flow and embedded flow
- Introduces a feature flag to manage chat features across different envs

### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifie
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** feat(ai): add endpoints to chat with ai service (#8585)
Co-authored-by: Riddhiagrawal001 <riddhi.agr
Files to modify:


**crates/api_models/src/chat.rs**
  Add:
    - struct: pub::ChatRequest
    - struct: pub::ChatResponse

**crates/api_models/src/events.rs**
  Add:
    - mod: pub::chat

**crates/api_models/src/events/chat.rs**
  Modify existing code

**crates/api_models/src/lib.rs**
  Add:
    - mod: pub::chat

**crates/common_utils/src/consts.rs**
  Modify existing code

**crates/common_utils/src/events.rs**
  Modify existing code

**crates/hyperswitch_domain_models/src/chat.rs**
  Add:
    - struct: pub::GetDataMessage
    - struct: pub::HyperswitchAiDataRequest

**crates/hyperswitch_domain_models/src/lib.rs**
  Add:
    - mod: pub::chat

**crates/router/src/configs/secrets_transformers.rs**
  Modify existing code

**crates/router/src/configs/settings.rs**
  Add:
    - struct: pub::ChatSettings

**crates/router/src/configs/validations.rs**
  Add:
    - function: pub::validate
    - impl: impl super::settings::ChatSettings

**crates/router/src/core.rs**
  Add:
    - mod: pub::chat

**crates/router/src/core/chat.rs**
  Add:
    - function: pub::get_data_from_hyperswitch_ai_workflow

**crates/router/src/core/errors.rs**
  Add:
    - mod: pub::chat

**crates/router/src/core/errors/chat.rs**
  Add:
    - function: private::switch
    - function: pub::get_error_message
    - enum: pub::ChatErrors
    - impl: impl common_utils::errors::ErrorSwitch<api_models::errors::types::ApiErrorResponse> for ChatErrors
    - impl: impl ChatErrors

**crates/router/src/lib.rs**
  Modify existing code

**crates/router/src/routes.rs**
  Add:
    - mod: pub::chat

**crates/router/src/routes/app.rs**
  Add:
    - function: pub::server
    - struct: pub::Chat
    - impl: impl Chat

**crates/router/src/routes/chat.rs**
  Add:
    - function: pub::get_data_from_hyperswitch_ai_workflow

**crates/router/src/routes/lock_utils.rs**
  Modify existing code

**crates/router_env/src/logger/types.rs**
  Modify existing code
{"issue_number": 8584, "pr_number": 8585, "commits_count": 1, "files_changed": 26, "response_length": 2807, "file_count": 23, "needs_breakdown": true}