Claus Ibsen created CAMEL-24276:
-----------------------------------
Summary: camel-tui: Add Azure OpenAI and GitHub Models support for
AI prompt
Key: CAMEL-24276
URL: https://issues.apache.org/jira/browse/CAMEL-24276
Project: Camel
Issue Type: Improvement
Components: camel-jbang
Reporter: Claus Ibsen
The TUI AI prompt (F8) supports OpenAI-compatible APIs, but Azure OpenAI and
GitHub Models have specific differences that prevent them from working out of
the box.
Azure OpenAI:
- Uses a different URL scheme:
{resource}.openai.azure.com/openai/deployments/{model}/chat/completions?api-version=...
- Uses api-key header instead of Authorization: Bearer
- The current normalizeOpenAiUrl() method would mangle the Azure URL format
- Needs auto-detection via AZURE_OPENAI_API_KEY and AZURE_OPENAI_ENDPOINT
environment variables
GitHub Models (Copilot API):
- Offers LLMs via https://models.inference.ai.azure.com using OpenAI-compatible
format
- Auth via GITHUB_TOKEN with Authorization: Bearer header
- Would mostly work through the existing OpenAI path, but lacks auto-detection
for GITHUB_TOKEN
- Should be added to the provider auto-detection chain
Both are important for enterprise users and developers who already have access
through existing subscriptions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)