mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-07-20 12:37:04 -04:00
[GH-ISSUE #73] [Enhancement]: Azure OpenAI LLM provider #41
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @adriaanvermaak on GitHub (Oct 28, 2025).
Original GitHub issue: https://github.com/vxcontrol/pentagi/issues/73
Originally assigned to: @asdek on GitHub.
Target Component
External Integrations (LLM/Search APIs)
Enhancement Description
good Day team,
Please could you look into adding Azure OpenAi support or indicate how to add azureAi to the custom configs?
AzureAi has lots of reasoning models available to deploy like gpt4-mini etc.
thank you for your great work
Technical Details
No response
Designs and Mockups
No response
Alternative Solutions
No response
Verification
@asdek commented on GitHub (Oct 28, 2025):
Hello @adriaanvermaak,
We have this feature in our roadmap for the nearest future. In the meantime, the easiest way to integrate Azure OpenAI is to set up LiteLLM as a proxy and add your Azure models like gpt-5-mini, gpt-4.1, gpt-4.1-mini, o4-mini and gpt-5, if it's available in your region.
Then you can use the following environment variables:
If you're running LiteLLM on the same server, you can place the container directly into the
pentagi-networkDocker network and use its hostname directly in theLLM_SERVER_URLvariable.For the LiteLLM configuration, you can use our existing OpenAI config as a template: https://github.com/vxcontrol/pentagi/blob/master/examples/configs/custom-openai.provider.yml
Alternatively, you can configure this directly from the product interface on the Settings page.
@adriaanvermaak commented on GitHub (Dec 4, 2025):
Hi Team,
hope you are well.
I have managed to get the LiteLLM routing to take place via Azure and works perfectly.
However I would like to know how do I get the embedding model hosted via Azure to work as well?
I see in the env there are variables for cust embeddings.
Could you provide assistance in how to get it work?
Embedding
EMBEDDING_URL=
EMBEDDING_KEY=
EMBEDDING_MODEL=
EMBEDDING_PROVIDER=
EMBEDDING_BATCH_SIZE=
EMBEDDING_STRIP_NEW_LINES=
below logs for reference.
time="2025-12-04T14:54:10Z" level=error msg="failed to perform subtasks generator" error="failed to get subtasks generator result: failed to exec function 'memorist': reached max retries to call function: failed to execute handler: failed to get memorist result: failed to get task memorist result: failed to exec function 'search_in_memory': reached max retries to call function: failed to execute handler: failed to search for similar documents: error embedding query: failed to create openai embeddings: send request: Post "https://api.openai.com/v1/embeddings": dial tcp: lookup api.openai.com on 127.0.0.11:53: read udp 127.0.0.1:37387->127.0.0.11:53: i/o timeout"
time="2025-12-04T14:54:10Z" level=error msg="failed to process input" component=worker error="failed to create task for flow 45: failed to create task worker: failed to generate subtasks: failed to generate subtasks for task 18: failed to perform subtasks generator: failed to get subtasks generator result: failed to exec function 'memorist': reached max retries to call function: failed to execute handler: failed to get memorist result: failed to get task memorist result: failed to exec function 'search_in_memory': reached max retries to call function: failed to execute handler: failed to search for similar documents: error embedding query: failed to create openai embeddings: send request: Post "https://api.openai.com/v1/embeddings": dial tcp: lookup api.openai.com on 127.0.0.11:53: read udp 127.0.0.1:37387->127.0.0.11:53: i/o timeout" flow_id=45 input="?" trace_id=3157124e-17a9-4761-bc02-0a98a4459f55 user_id=1
@asdek commented on GitHub (Dec 4, 2025):
hey @adriaanvermaak
it's nice to hear you were able to set it up 😉
here are the settings that work with the latest LiteLLM version:
@adriaanvermaak commented on GitHub (Dec 4, 2025):
hi @asdek
thank you for the quick response.
after adding the env and restarting the container
Embedding
EMBEDDING_URL=http://litellm:4000/v1
EMBEDDING_KEY=llm_master_******
EMBEDDING_MODEL=azure/aim-text-embedding-3-large-lab
EMBEDDING_PROVIDER=openai
EMBEDDING_BATCH_SIZE=
EMBEDDING_STRIP_NEW_LINES=
see this in the logs
time="2025-12-04T17:10:01Z" level=warning msg="failed to exec function" agent=custom error="failed to execute handler: failed to search for similar documents: error embedding query: failed to create openai embeddings: send request: Post "https://api.openai.com/v1/embeddings": dial tcp: lookup api.openai.com on 127.0.0.11:53: read udp 127.0.0.1:44609->127.0.0.11:53: i/o timeout" flow_id=45 func_args="{"question": "What task is currently in progress and what is the objective for the user?", "task_id": 18, "message": "Clarifying the current task and its objective."}" func_name=search_in_memory msg_chain_id=785 tool_call_id=call_TiAasoIvmZQRcXPfMLdx2Gzq
time="2025-12-04T17:10:12Z" level=error msg="failed to search for similar documents" args="{"question":"What task is currently in progress and what is the objective for the user?","task_id":18,"message":"Clarifying the current task and its objective."}" error="error embedding query: failed to create openai embeddings: send request: Post "https://api.openai.com/v1/embeddings": dial tcp: lookup api.openai.com on 127.0.0.11:53: read udp 127.0.0.1:41971->127.0.0.11:53: i/o timeout" query="What task is currently in progress and what is the objective for the user?" task_id=18 tool=search_in_memory
time="2025-12-04T17:10:12Z" level=warning msg="failed to exec function" agent=custom error="failed to execute handler: failed to search for similar documents: error embedding query: failed to create openai embeddings: send request: Post "https://api.openai.com/v1/embeddings": dial tcp: lookup api.openai.com on 127.0.0.11:53: read udp 127.0.0.1:41971->127.0.0.11:53: i/o timeout" flow_id=45 func_args="{"question": "What task is currently in progress and what is the objective for the user?", "task_id": 18, "message": "Clarifying the current task and its objective."}" func_name=search_in_memory msg_chain_id=785 tool_call_id=call_TiAasoIvmZQRcXPfMLdx2Gzq
time="2025-12-04T17:10:13Z" level=error msg="failed to exec function" agent=custom error="reached max retries to call function: failed to execute handler: failed to search for similar documents: error embedding query: failed to create openai embeddings: send request: Post "https://api.openai.com/v1/embeddings": dial tcp: lookup api.openai.com on 127.0.0.11:53: read udp 127.0.0.1:41971->127.0.0.11:53: i/o timeout" flow_id=45 func_args="{"question": "What task is currently in progress and what is the objective for the user?", "task_id": 18, "message": "Clarifying the current task and its objective."}" func_name=search_in_memory msg_chain_id=785 tool_call_id=call_TiAasoIvmZQRcXPfMLdx2Gzq
time="2025-12-04T17:10:13Z" level=error msg="failed to exec tool call" agent=searcher error="failed to exec function 'search_in_memory': reached max retries to call function: failed to execute handler: failed to search for similar documents: error embedding query: failed to create openai embeddings: send request: Post "https://api.openai.com/v1/embeddings": dial tcp: lookup api.openai.com on 127.0.0.11:53: read udp 127.0.0.1:41971->127.0.0.11:53: i/o timeout" flow_id=45 func_args="{"question": "What task is currently in progress and what is the objective for the user?", "task_id": 18, "message": "Clarifying the current task and its objective."}" func_name=search_in_memory msg_chain_id=785 provider=custom task_id=19
time="2025-12-04T17:10:13Z" level=error msg="failed to get memorist result" error="failed to get task memorist result: failed to exec function 'search_in_memory': reached max retries to call function: failed to execute handler: failed to search for similar documents: error embedding query: failed to create openai embeddings: send request: Post "https://api.openai.com/v1/embeddings": dial tcp: lookup api.openai.com on 127.0.0.11:53: read udp 127.0.0.1:41971->127.0.0.11:53: i/o timeout"
time="2025-12-04T17:10:13Z" level=warning msg="failed to exec function" agent=custom error="failed to execute handler: failed to get memorist result: failed to get task memorist result: failed to exec function 'search_in_memory': reached max retries to call function: failed to execute handler: failed to search for similar documents: error embedding query: failed to create openai embeddings: send request: Post "https://api.openai.com/v1/embeddings": dial tcp: lookup api.openai.com on 127.0.0.11:53: read udp 127.0.0.1:41971->127.0.0.11:53: i/o timeout" flow_id=45 func_args="{"question":"I need to understand what task is currently in progress and what the objective is for the user. The previous tasks indicate a quick recon assessment on a website using curl and nmap, but there is no specific task input provided. Can you clarify the current focus?","task_id":18,"message":"Get clarity on the current user's objectives and any tasks that need to be accomplished."}" func_name=memorist msg_chain_id=784 tool_call_id=call_BCKrPm9EOblOt2ghiY9ioEBx
time="2025-12-04T17:10:30Z" level=error msg="failed to search for similar documents" args="{"question": "What task is currently in progress regarding user authentication using OAuth 2.0?", "task_id": 18, "message": "Clarifying the current task in progress related to user authentication."}" error="error embedding query: failed to create openai embeddings: send request: Post "https://api.openai.com/v1/embeddings": dial tcp: lookup api.openai.com on 127.0.0.11:53: read udp 127.0.0.1:59689->127.0.0.11:53: i/o timeout" query="What task is currently in progress regarding user authentication using OAuth 2.0?" task_id=18 tool=search_in_memory
time="2025-12-04T17:10:30Z" level=warning msg="failed to exec function" agent=custom error="failed to execute handler: failed to search for similar documents: error embedding query: failed to create openai embeddings: send request: Post "https://api.openai.com/v1/embeddings": dial tcp: lookup api.openai.com on 127.0.0.11:53: read udp 127.0.0.1:59689->127.0.0.11:53: i/o timeout" flow_id=45 func_args="{"question": "What task is currently in progress regarding user authentication using OAuth 2.0?", "task_id": 18, "message": "Clarifying the current task in progress related to user authentication."}" func_name=search_in_memory msg_chain_id=791 tool_call_id=call_zji3J7UTY1rAdRkWJV7d0IKJ
time="2025-12-04T17:10:41Z" level=error msg="failed to search for similar documents" args="{"question":"What task is currently in progress regarding user authentication using OAuth 2.0?","task_id":18,"message":"Clarifying the current task in progress related to user authentication.","subtask_id":null}" error="error embedding query: failed to create openai embeddings: send request: Post "https://api.openai.com/v1/embeddings": dial tcp: lookup api.openai.com on 127.0.0.11:53: read udp 127.0.0.1:45294->127.0.0.11:53: i/o timeout" query="What task is currently in progress regarding user authentication using OAuth 2.0?" task_id=18 tool=search_in_memory
time="2025-12-04T17:10:41Z" level=warning msg="failed to exec function" agent=custom error="failed to execute handler: failed to search for similar documents: error embedding query: failed to create openai embeddings: send request: Post "https://api.openai.com/v1/embeddings": dial tcp: lookup api.openai.com on 127.0.0.11:53: read udp 127.0.0.1:45294->127.0.0.11:53: i/o timeout" flow_id=45 func_args="{"question": "What task is currently in progress regarding user authentication using OAuth 2.0?", "task_id": 18, "message": "Clarifying the current task in progress related to user authentication."}" func_name=search_in_memory msg_chain_id=791 tool_call_id=call_zji3J7UTY1rAdRkWJV7d0IKJ
@adriaanvermaak commented on GitHub (Dec 4, 2025):
not sure if we need to add anything else to the custom provider yml but seems to persist with using openai
@asdek commented on GitHub (Dec 4, 2025):
it's so weird... please, be sure that you make
docker compose up -din the pentagi directory, because it should use your EMBEDDING_URL options.also, I'll check it in 2 hours.
@adriaanvermaak commented on GitHub (Dec 4, 2025):
thanks @asdek ,
will be available as well.
compose is running in correct directory for pentagi.
I have also commented out openai variable in .env as well, no difference.
happy share configs if needed.
@asdek commented on GitHub (Dec 4, 2025):
@adriaanvermaak I checked it on my side and these vars enough to work, also, by the code it should work...
let's check your docker-compose.yml, is it contain these strings for pentagi service?
in additional, you can use
etestertool to check embedder before run a flow:@adriaanvermaak commented on GitHub (Dec 4, 2025):
thank you @asdek
seems just updating the env with those values for embedding doesnt populate into the container.
╰─ docker exec -it pentagi env | grep EMBEDDING
EMBEDDING_PROVIDER=
EMBEDDING_URL=
EMBEDDING_KEY=
EMBEDDING_MODEL=
EMBEDDING_STRIP_NEW_LINES=
EMBEDDING_BATCH_SIZE=
after docker compose up -d --force-recreate pentagi
docker exec -it pentagi env | grep EMBEDDING
EMBEDDING_KEY=llm_***********************
EMBEDDING_MODEL=azure/aim-text-embedding-3-large-lab
EMBEDDING_BATCH_SIZE=
EMBEDDING_STRIP_NEW_LINES=
EMBEDDING_PROVIDER=openai
EMBEDDING_URL=http://litellm:4000/v1
thanks @asdek appreciate your help
@asdek commented on GitHub (Dec 4, 2025):
you are welcome!
@adriaanvermaak commented on GitHub (Dec 4, 2025):
hi @asdek
sorry for dropping this question in here.
for the kali containers that spin up with the workflows, where can we add global DNS settings for them?
@asdek commented on GitHub (Dec 4, 2025):
I think you can use file /etc/docker/daemon.json and there should be dns-servers option.
I would recommend you to use separate installation for two nodes according to this guide https://github.com/vxcontrol/pentagi/blob/master/examples/guides/worker_node.md
And this settings about dns-servers you should do on the worker node only.
@adriaanvermaak commented on GitHub (Dec 4, 2025):
Thanks you for your great assistance @asdek