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: 2 additions & 0 deletions application/single_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
from route_plugin_logging import bpl as plugin_logging_bp
from functions_custom_pages import get_custom_pages_nav
from functions_debug import debug_print
from functions_model_endpoint_providers import get_model_endpoint_provider_ui_options

Check warning on line 108 in application/single_app/app.py

View workflow job for this annotation

GitHub Actions / malicious-pr-security-review

Important - Changed line contains AI, plugin, agent, or workspace boundary marker. Recommendation%3A Check whether prompts, chat history, uploaded documents, embeddings, citations, settings, or identity can cross a new boundary.
from functions_terms_of_use import has_terms_of_use_acceptance
from functions_mcp_server_auth import inbound_mcp_required_blueprint

Expand Down Expand Up @@ -589,6 +590,7 @@
idle_timeout_enabled=idle_timeout_enabled,
idle_timeout_minutes=idle_timeout_minutes,
idle_warning_minutes=idle_warning_minutes,
model_endpoint_api_types=get_model_endpoint_provider_ui_options(),

Check warning on line 593 in application/single_app/app.py

View workflow job for this annotation

GitHub Actions / malicious-pr-security-review

Important - Changed line contains AI, plugin, agent, or workspace boundary marker. Recommendation%3A Check whether prompts, chat history, uploaded documents, embeddings, citations, settings, or identity can cross a new boundary.
mcp_ui_enabled=is_mcp_ui_enabled()
)

Expand Down
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.012"
VERSION = "0.261.021"
IS_DEVELOPMENT = is_development_env_enabled()

# Opt-out for deployments where App Service Easy Auth is active but the platform
Expand Down
32 changes: 29 additions & 3 deletions application/single_app/functions_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
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 (

Check warning on line 40 in application/single_app/functions_documents.py

View workflow job for this annotation

GitHub Actions / malicious-pr-security-review

Important - Changed line contains AI, plugin, agent, or workspace boundary marker. Recommendation%3A Check whether prompts, chat history, uploaded documents, embeddings, citations, settings, or identity can cross a new boundary.
get_model_endpoint_api_type,

Check warning on line 41 in application/single_app/functions_documents.py

View workflow job for this annotation

GitHub Actions / malicious-pr-security-review

Important - Changed line contains AI, plugin, agent, or workspace boundary marker. Recommendation%3A Check whether prompts, chat history, uploaded documents, embeddings, citations, settings, or identity can cross a new boundary.
resolve_model_endpoint_request_model,

Check warning on line 42 in application/single_app/functions_documents.py

View workflow job for this annotation

GitHub Actions / malicious-pr-security-review

Important - Changed line contains AI, plugin, agent, or workspace boundary marker. Recommendation%3A Check whether prompts, chat history, uploaded documents, embeddings, citations, settings, or identity can cross a new boundary.
)
from model_endpoint_clients import MODEL_ENDPOINT_PROTOCOL_AZURE_OPENAI, infer_model_endpoint_protocol

Check warning on line 44 in application/single_app/functions_documents.py

View workflow job for this annotation

GitHub Actions / malicious-pr-security-review

Important - Changed line contains AI, plugin, agent, or workspace boundary marker. Recommendation%3A Check whether prompts, chat history, uploaded documents, embeddings, citations, settings, or identity can cross a new boundary.

Check warning on line 44 in application/single_app/functions_documents.py

View workflow job for this annotation

GitHub Actions / malicious-pr-security-review

Important - Changed line contains secret or sensitive data source marker. Recommendation%3A Pair this source with any nearby network, logging, serialization, or process execution sink before approving.
Comment thread
paullizer marked this conversation as resolved.
Dismissed
import azure.cognitiveservices.speech as speechsdk

_AUDIO_RUNTIME_CAPABILITIES_CACHE = None
Expand Down Expand Up @@ -142,6 +147,9 @@
api_version,
deployment_name,
*,
api_type='',
anthropic_version='',
allow_private_custom_endpoints=False,
settings=None,
endpoint_config=None,
identity_context=None,
Expand All @@ -152,6 +160,9 @@
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 @@ -191,21 +202,36 @@
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 = str(model_cfg.get("deploymentName") or model_cfg.get("deployment") or "").strip()
deployment = resolve_model_endpoint_request_model(endpoint_cfg, model_cfg)

Check warning on line 205 in application/single_app/functions_documents.py

View workflow job for this annotation

GitHub Actions / malicious-pr-security-review

Important - Changed line contains AI, plugin, agent, or workspace boundary marker. Recommendation%3A Check whether prompts, chat history, uploaded documents, embeddings, citations, settings, or identity can cross a new boundary.
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)

Check warning on line 208 in application/single_app/functions_documents.py

View workflow job for this annotation

GitHub Actions / malicious-pr-security-review

Important - Changed line contains AI, plugin, agent, or workspace boundary marker. Recommendation%3A Check whether prompts, chat history, uploaded documents, embeddings, citations, settings, or identity can cross a new boundary.
anthropic_version = str(connection.get("anthropic_version") or "").strip()
runtime_protocol = infer_model_endpoint_protocol(

Check warning on line 210 in application/single_app/functions_documents.py

View workflow job for this annotation

GitHub Actions / malicious-pr-security-review

Important - Changed line contains AI, plugin, agent, or workspace boundary marker. Recommendation%3A Check whether prompts, chat history, uploaded documents, embeddings, citations, settings, or identity can cross a new boundary.
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 api_version or not deployment:
raise ValueError("Selected metadata extraction endpoint is missing endpoint, API version, or deployment configuration.")
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.")

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