-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Feat azure OpenAI API migration to response API + minor UI improvement #6288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feat azure OpenAI API migration to response API + minor UI improvement #6288
Conversation
8550749 to
a8a84b0
Compare
d0d81c9 to
a0b2858
Compare
Signed-off-by: Jonathan MERCIER <bioinfornatics@gmail.com>
Signed-off-by: Jonathan MERCIER <bioinfornatics@gmail.com>
Signed-off-by: Jonathan MERCIER <bioinfornatics@gmail.com>
Signed-off-by: Jonathan MERCIER <bioinfornatics@gmail.com>
Signed-off-by: Jonathan MERCIER <bioinfornatics@gmail.com>
…t not azure openai Signed-off-by: Jonathan MERCIER <bioinfornatics@gmail.com>
Signed-off-by: Jonathan MERCIER <bioinfornatics@gmail.com>
Signed-off-by: Jonathan MERCIER <bioinfornatics@gmail.com>
Signed-off-by: Jonathan MERCIER <bioinfornatics@gmail.com>
2bda0db to
f204b1e
Compare
| /// Configuration key metadata for provider setup | ||
| #[derive(Debug, Clone, Serialize, Deserialize, ToSchema)] | ||
| pub struct AuthModeChoice { | ||
| /// Valeur stockée dans la configuration (ex: "api_key", "entra_id") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eh let's keep comments in english if needed at all
| label: string; | ||
| description?: string | null; | ||
| requires_api_key: boolean; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a dupe, you should get this from the API
| // Ignore parse errors; user may still be typing an incomplete URL or has pasted invalid text. | ||
| // We avoid being intrusive in these cases. | ||
| } | ||
| }, 800); // ~0.8s debounce to allow human typing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using a timer for this sort of thing is not the right way to do this. also having three ways of getting this done doesn't make sense to me. pick one.
|
@katzdave can you have a look at this since you looked at the one we did for openai itself? we should make sure to reuse as much code as possible. haven't looked too closely in the auth mode stuff, but left some preliminary comments |
Azure OpenAI Responses API support & auth UX improvements
This PR updates Azure OpenAI support in both the CLI and desktop app to match the Azure portal’s Responses API (including gpt‑5.x models) and makes configuration of authentication and endpoints much easier.
Highlights
api-versionvalues.Backend / CLI
Auth mode switch for Azure OpenAI
AZURE_OPENAI_AUTH_TYPEconfig key with two modes:api_key→ sendsapi-key: <AZURE_OPENAI_API_KEY>entra_id→ sendsAuthorization: Bearer <token from Azure CLI / default credentials>Endpoint and API version handling aligned with the portal
AZURE_OPENAI_ENDPOINTnow accepts:https://<resource>.cognitiveservices.azure.com)…/openai/responses)…/openai/responses?api-version=2025-04-01-preview)scheme://host[:port])api-versionextracted from the query string.AZURE_OPENAI_API_VERSIONis chosen with this priority:AZURE_OPENAI_API_VERSIONin config (if set)api-versionparsed fromAZURE_OPENAI_ENDPOINTAZURE_DEFAULT_API_VERSIONapi-version=2025-04-01-previewworked but goose used2025-04-01and got 404.Model list / defaults
gpt-5.1and related variants.Desktop UI
Authentication type dropdown for Azure OpenAI
azure_openai):AZURE_OPENAI_AUTH_TYPE=api_keyAZURE_OPENAI_AUTH_TYPE=entra_id“Paste the portal URL” endpoint UX
AZURE_OPENAI_ENDPOINT(with a short debounce ~800 ms) and applies:…/openai/responses) → rewrite to just the base endpoint; leaveAZURE_OPENAI_API_VERSIONunchanged.api-version→ rewrite to base endpoint and setAZURE_OPENAI_API_VERSIONfrom the query param.azure_openaiprovider.Fix for config field re-population
and only falls back to the server value in the latter case.