DeepCode
DeepCode copied to clipboard
[Question]:Support for AzureOpenAI or custom open AI provider?
Do you need to ask a question?
- [x] I have searched the existing question and discussions and this question is not already answered.
- [x] I believe this is a legitimate question, not just a bug or feature request.
Your Question
In the mcp_agent.secrets.yaml I am using
azure:
api_key: "my api key"
endpoint: "azure endpoint"
api_version: "2025-01-01-preview"
But I have been facing error (full log below):
β run_research_analyzer failed: 1 validation error for RequestCompletionRequest
config
Input should be a valid dictionary or instance of OpenAISettings [type=model_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.11/v/model_type
Exception details: ValidationError: 1 validation error for RequestCompletionRequest
It seems to me that this error occurs because I have been using AzureOpenAi. Could any make sure if this assumption is correct? If so how can I integrate AzureOpenAI into the code?
Same applies to custom open ai compatible provider such as kimi K2 by Moonshot AI.
Additional Context
π Initializing Agent Orchestration Engine... β
[22:59:16] β
π§ Agent Orchestration Engine initialized successfully
[22:59:16] β³ π Starting comprehensive agent orchestration pipeline...
π COMPREHENSIVE PIPELINE STATUS
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Initialize β Setting up AI engine β β³ IN PROGRESS
π Analyze β Analyzing research content β βΈοΈ PENDING
π₯ Download β Processing document β βΈοΈ PENDING
π Plan β Generating code architecture β βΈοΈ PENDING
π References β Analyzing references β βΈοΈ PENDING
π¦ Repos β Downloading repositories β βΈοΈ PENDING
ποΈ Index β Building code index β βΈοΈ PENDING
βοΈ Implement β Implementing code β βΈοΈ PENDING
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π COMPREHENSIVE PIPELINE STATUS
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Initialize β Setting up AI engine β β COMPLETED
π Analyze β Analyzing research content β β³ IN PROGRESS
π₯ Download β Processing document β βΈοΈ PENDING
π Plan β Generating code architecture β βΈοΈ PENDING
π References β Analyzing references β βΈοΈ PENDING
π¦ Repos β Downloading repositories β βΈοΈ PENDING
ποΈ Index β Building code index β βΈοΈ PENDING
βοΈ Implement β Implementing code β βΈοΈ PENDING
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[22:59:16] β³ π Setting up workspace for file processing...
π Initializing intelligent multi-agent research orchestration system
π Working environment: local
π Workspace directory: /Users/ahmed/work/my_projects/prompt_tuning/DeepCode/deepcode_lab
β
Workspace status: ready
π§ Advanced intelligence analysis enabled - comprehensive workflow
π COMPREHENSIVE PIPELINE STATUS
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Initialize β Setting up AI engine β β COMPLETED
π Analyze β Analyzing research content β β³ IN PROGRESS
π₯ Download β Processing document β βΈοΈ PENDING
π Plan β Generating code architecture β βΈοΈ PENDING
π References β Analyzing references β βΈοΈ PENDING
π¦ Repos β Downloading repositories β βΈοΈ PENDING
ποΈ Index β Building code index β βΈοΈ PENDING
βοΈ Implement β Implementing code β βΈοΈ PENDING
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[22:59:16] β³ π Analyzing research content and extracting key information...
π Starting research analysis...
Input prompt length: 56
Input preview: /Users/ahmed/work/papers/contextEngr/promptEvolution.pdf...
π Using search server: web-search-mcp
[INFO] 2025-07-28T22:58:59 mcp_agent.core.context - Configuring logger with level: info
[INFO] 2025-07-28T22:58:59 mcp_agent.cli_agent_orchestration - MCPApp initialized
{
"data": {
"progress_action": "Running",
"target": "cli_agent_orchestration",
"agent_name": "mcp_application_loop",
"session_id": "57a353be-821a-450c-88e3-10305a75dc9c"
}
}
[INFO] 2025-07-28T22:59:16 mcp_agent.core.context - Configuring logger with level: info
[INFO] 2025-07-28T22:59:16 mcp_agent.cli_agent_orchestration - MCPApp initialized
{
"data": {
"progress_action": "Running",
"target": "cli_agent_orchestration",
"agent_name": "mcp_application_loop",
"session_id": "2249ef04-94fd-40c3-903e-4f1c433c10bc"
}
}
[INFO] 2025-07-28T22:59:16 mcp_agent.cli_agent_orchestration - MCPApp cleanup
{
"data": {
"progress_action": "Finished",
"target": "cli_agent_orchestration",
"agent_name": "mcp_application_loop"
}
}
[INFO] 2025-07-28T22:59:16 mcp_agent.mcp.mcp_connection_manager - web-search-mcp: Up and running with a persistent connection!
analyzer: Connected to server, calling list_tools...
Tools available: {'meta': None, 'nextCursor': None, 'tools': [{'name': 'web-search-mcp_full-web-search', 'title': None, 'description': 'Search the web and fetch complete page content from top results. This is
the most comprehensive web search tool. It searches the web and then follows the resulting links to extract their full page content, providing the most detailed and complete information available. Use
get-web-search-summaries for a lightweight alternative.', 'inputSchema': {'type': 'object', 'properties': {'query': {'type': 'string', 'description': 'Search query to execute (recommended for comprehensive
research)'}, 'limit': {'type': ['number', 'string'], 'default': 5, 'description': 'Number of results to return with full content (1-10)'}, 'includeContent': {'type': ['boolean', 'string'], 'default': True,
'description': 'Whether to fetch full page content (default: true)'}, 'maxContentLength': {'type': ['number', 'string'], 'description': 'Maximum characters per result content (0 = no limit). Usually not needed
- content length is automatically optimized.'}}, 'required': ['query'], 'additionalProperties': False, '$schema': 'http://json-schema.org/draft-07/schema#'}, 'outputSchema': None, 'annotations': None, 'meta':
None}, {'name': 'web-search-mcp_get-web-search-summaries', 'title': None, 'description': 'Search the web and return only the search result snippets/descriptions without following links to extract full page
content. This is a lightweight alternative to full-web-search for when you only need brief search results. For comprehensive information, use full-web-search instead.', 'inputSchema': {'type': 'object',
'properties': {'query': {'type': 'string', 'description': 'Search query to execute (lightweight alternative)'}, 'limit': {'type': ['number', 'string'], 'default': 5, 'description': 'Number of search results to
return (1-10)'}}, 'required': ['query'], 'additionalProperties': False, '$schema': 'http://json-schema.org/draft-07/schema#'}, 'outputSchema': None, 'annotations': None, 'meta': None}, {'name':
'web-search-mcp_get-single-web-page-content', 'title': None, 'description': 'Extract and return the full content from a single web page URL. This tool follows a provided URL and extracts the main page content.
Useful for getting detailed content from a specific webpage without performing a search.', 'inputSchema': {'type': 'object', 'properties': {'url': {'type': 'string', 'format': 'uri', 'description': 'The URL of
the web page to extract content from'}, 'maxContentLength': {'type': ['number', 'string'], 'description': 'Maximum characters for the extracted content (0 = no limit, undefined = use default limit). Usually not
needed - content length is automatically optimized.'}}, 'required': ['url'], 'additionalProperties': False, '$schema': 'http://json-schema.org/draft-07/schema#'}, 'outputSchema': None, 'annotations': None,
'meta': None}]}
β
LLM attached successfully
π Making LLM request with params: max_tokens=6144, temperature=0.3
β LLM generation failed: 1 validation error for RequestCompletionRequest
config
Input should be a valid dictionary or instance of OpenAISettings [type=model_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.11/v/model_type
Exception type: <class 'pydantic_core._pydantic_core.ValidationError'>
[INFO] 2025-07-28T22:59:16 mcp_agent.mcp.mcp_aggregator.ResearchAnalyzerAgent - Last aggregator closing, shutting down all persistent connections...
[INFO] 2025-07-28T22:59:16 mcp_agent.mcp.mcp_connection_manager - Disconnecting all persistent server connections...
[INFO] 2025-07-28T22:59:16 mcp_agent.mcp.mcp_connection_manager - web-search-mcp: Requesting shutdown...
[INFO] 2025-07-28T22:59:16 mcp_agent.mcp.mcp_connection_manager - All persistent server connections signaled to disconnect.
[INFO] 2025-07-28T22:59:16 mcp_agent.mcp.mcp_connection_manager - Disconnecting all persistent server connections...
β run_research_analyzer failed: 1 validation error for RequestCompletionRequest
config
Input should be a valid dictionary or instance of OpenAISettings [type=model_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.11/v/model_type
Exception details: ValidationError: 1 validation error for RequestCompletionRequest
Thank you for your interest. We found that this may involve modifications to the mcp-agent package. We will consider adding this support after completing the new feature implementation and dataset testing.