Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion application/single_app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
EXECUTOR_TYPE = 'thread'
EXECUTOR_MAX_WORKERS = 30
SESSION_TYPE = 'filesystem'
VERSION = "0.261.010"
VERSION = "0.261.009"
IS_DEVELOPMENT = is_development_env_enabled()

# Opt-out for deployments where App Service Easy Auth is active but the platform
Expand Down
32 changes: 3 additions & 29 deletions application/single_app/functions_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@
from functions_keyvault import SecretReturnType, keyvault_model_endpoint_get_helper
from functions_model_endpoint_identity_header import build_model_endpoint_identity_headers
from functions_model_endpoint_runtime import MODEL_ENDPOINT_PROVIDER_ALLOWLIST, build_model_endpoint_sync_chat_client
from functions_model_endpoint_types import (
get_model_endpoint_api_type,
resolve_model_endpoint_request_model,
)
from model_endpoint_clients import MODEL_ENDPOINT_PROTOCOL_AZURE_OPENAI, infer_model_endpoint_protocol
import azure.cognitiveservices.speech as speechsdk

_AUDIO_RUNTIME_CAPABILITIES_CACHE = None
Expand Down Expand Up @@ -147,9 +142,6 @@ def _build_model_endpoint_client(
api_version,
deployment_name,
*,
api_type='',
anthropic_version='',
allow_private_custom_endpoints=False,
settings=None,
endpoint_config=None,
identity_context=None,
Expand All @@ -160,9 +152,6 @@ def _build_model_endpoint_client(
endpoint,
api_version,
deployment_name=deployment_name,
api_type=api_type,
anthropic_version=anthropic_version,
allow_private_custom_endpoints=allow_private_custom_endpoints,
settings=settings,
endpoint_config=endpoint_config,
identity_context=identity_context,
Expand Down Expand Up @@ -202,36 +191,21 @@ def _resolve_metadata_extraction_client(settings, identity_context=None):
provider = str(endpoint_cfg.get("provider") or selection["provider"] or "aoai").lower()
connection = endpoint_cfg.get("connection", {}) or {}
auth_settings = endpoint_cfg.get("auth", {}) or {}
deployment = resolve_model_endpoint_request_model(endpoint_cfg, model_cfg)
deployment = str(model_cfg.get("deploymentName") or model_cfg.get("deployment") or "").strip()
endpoint = str(connection.get("endpoint") or "").strip()
api_version = str(connection.get("openai_api_version") or connection.get("api_version") or "").strip()
api_type = get_model_endpoint_api_type(endpoint_cfg)
anthropic_version = str(connection.get("anthropic_version") or "").strip()
runtime_protocol = infer_model_endpoint_protocol(
provider,
endpoint,
deployment,
api_type,
)

if provider not in MODEL_ENDPOINT_PROVIDER_ALLOWLIST:
raise ValueError(f"Selected metadata extraction provider '{provider}' is not supported.")
if not endpoint or not deployment or (
runtime_protocol == MODEL_ENDPOINT_PROTOCOL_AZURE_OPENAI and not api_version
):
raise ValueError("Selected metadata extraction endpoint is incomplete.")
if not endpoint or not api_version or not deployment:
raise ValueError("Selected metadata extraction endpoint is missing endpoint, API version, or deployment configuration.")

return _build_model_endpoint_client(
auth_settings,
provider,
endpoint,
api_version,
deployment,
api_type=api_type,
anthropic_version=anthropic_version,
allow_private_custom_endpoints=bool(
settings.get("allow_private_custom_model_endpoints", False)
),
settings=settings,
endpoint_config=endpoint_cfg,
identity_context=identity_context,
Expand Down
Loading
Loading