[GH-ISSUE #151] Using OpenAI API key built with azure #51

Closed
opened 2026-02-27 07:20:10 +03:00 by kerem · 4 comments
Owner

Originally created by @Redteamer0101 on GitHub (Feb 20, 2026).
Original GitHub issue: https://github.com/KeygraphHQ/shannon/issues/151

Hi, I'm trying to setup my azure open ai api key but it's coming as Invalid api key.

This is how I put it in .env

OPENAI_API_KEY=key
ROUTER_DEFAULT=azure/gpt-5

can you help me to setup this.

Originally created by @Redteamer0101 on GitHub (Feb 20, 2026). Original GitHub issue: https://github.com/KeygraphHQ/shannon/issues/151 Hi, I'm trying to setup my azure open ai api key but it's coming as Invalid api key. This is how I put it in .env OPENAI_API_KEY=key ROUTER_DEFAULT=azure/gpt-5 can you help me to setup this.
kerem closed this issue 2026-02-27 07:20:10 +03:00
Author
Owner

@ezl-keygraph commented on GitHub (Feb 20, 2026):

We haven't tested with Azure OpenAI, but technically it should work with the following changes

  1. You can try adding this to the Providers in the router-config.json and use the .env you have mentioned
    {
      "name": "azure",
      "api_base_url": "https://your-azure-chat-completion-base-url/v1/chat/completions",
      "api_key": "$OPENAI_API_KEY",
      "models": ["gpt-5.2", "gpt-5-mini"],
      "transformer": {
        "use": [["maxcompletiontokens", { "max_completion_tokens": 16384 }]]
      }
    }
  1. Deploy gpt-5.2 and gpt-5-mini models in Azure OpenAI in order to use them
  2. Let us know if you were able to run Shannon successfully using Azure OpenAI. If so we can add it to the README.md, so that it will be helpful for other users as well
<!-- gh-comment-id:3933548325 --> @ezl-keygraph commented on GitHub (Feb 20, 2026): We haven't tested with Azure OpenAI, but technically it should work with the following changes 1. You can try adding this to the Providers in the [router-config.json](https://github.com/KeygraphHQ/shannon/blob/main/configs/router-config.json) and use the `.env` you have mentioned ``` { "name": "azure", "api_base_url": "https://your-azure-chat-completion-base-url/v1/chat/completions", "api_key": "$OPENAI_API_KEY", "models": ["gpt-5.2", "gpt-5-mini"], "transformer": { "use": [["maxcompletiontokens", { "max_completion_tokens": 16384 }]] } } ``` 2. Deploy `gpt-5.2` and `gpt-5-mini` models in Azure OpenAI in order to use them 3. Let us know if you were able to run Shannon successfully using Azure OpenAI. If so we can add it to the `README.md`, so that it will be helpful for other users as well
Author
Owner

@Redteamer0101 commented on GitHub (Feb 23, 2026):

Nope getting same error invalid api key let me do bit of troubleshoot seems like it's not taking my api key

<!-- gh-comment-id:3943003081 --> @Redteamer0101 commented on GitHub (Feb 23, 2026): Nope getting same error invalid api key let me do bit of troubleshoot seems like it's not taking my api key
Author
Owner

@Aman-Haris-855 commented on GitHub (Feb 23, 2026):

Hi, I explored this problem and it a requires a lot of efforts to find the solution. Here are my observations so far:

  1. The codebase doesn't support reasoning models as they use responses api. The code is configured to use chat/completions api, so the latest model that supports it is gpt-4.1.
  2. The current OpenAI implementation won't be able to support the Azure OpenAI architecture, and the code given above doesn't solve the issue.

I am working on a solution, but for some reason the Pre recon agent is not saving the pre_recon_deliverable.md file in the correct, due to which the recon agent is failing. Once I am able to get the agents running successfully, I can open a PR with the implementation.

<!-- gh-comment-id:3945415350 --> @Aman-Haris-855 commented on GitHub (Feb 23, 2026): Hi, I explored this problem and it a requires a lot of efforts to find the solution. Here are my observations so far: 1. The codebase doesn't support reasoning models as they use responses api. The code is configured to use chat/completions api, so the latest model that supports it is gpt-4.1. 2. The current OpenAI implementation won't be able to support the Azure OpenAI architecture, and the code given above doesn't solve the issue. I am working on a solution, but for some reason the Pre recon agent is not saving the pre_recon_deliverable.md file in the correct, due to which the recon agent is failing. Once I am able to get the agents running successfully, I can open a PR with the implementation.
Author
Owner

@keygraphVarun commented on GitHub (Feb 24, 2026):

As we mentioned in our README, the Claude Code router is unsupported and is intended as an off-ramp for community-focused exploration of other models. We've noticed a lot of variance using non-Anthropic outside of our default.
We are built on the Anthropic harness and, for now, are optimized only for Anthropic models.

<!-- gh-comment-id:3948620660 --> @keygraphVarun commented on GitHub (Feb 24, 2026): As we mentioned in our README, the Claude Code router is unsupported and is intended as an off-ramp for community-focused exploration of other models. We've noticed a lot of variance using non-Anthropic outside of our default. We are built on the Anthropic harness and, for now, are optimized only for Anthropic models.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shannon-KeygraphHQ#51
No description provided.