Commit Graph

13 Commits

  • [BREAKING] Python: fix OpenAI Azure routing and provider samples (#4925)
    * Python: fix OpenAI Azure routing and provider samples
    
    Prefer OpenAI when OPENAI_API_KEY is present unless Azure is explicitly requested. Clarify constructor docs, keep deprecated Azure wrappers compatible with stricter settings validation, and refresh the provider samples and tests to use the current client patterns.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * fix bandit
    
    * Python: align OpenAI embedding Azure routing
    
    Extend the shared OpenAI-vs-Azure routing and credential behavior to the embedding client, add Azure embedding regression coverage, and refresh the embedding samples to use the generic client path.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: fix embedding client pyright check
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: thin OpenAI embedding wrapper
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: document embedding overload routing
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: fix callable OpenAI key routing
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: fix Azure credential routing tests
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: address OpenAI review feedback
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: narrow Azure routing markers
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: refine OpenAI model fallback order
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: narrow Azure deployment docs
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: remove embedding routing wording
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: run embedding Azure integration tests
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * changed variable name
    
    * Python: expand OpenAI package README
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * clarified readme
    
    * Python: fix Azure OpenAI integration setup
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: correct Azure integration env mapping
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * updated code to fix int tests
    
    * test updates
    
    * test fix
    
    * fix test setup
    
    * updates to tests and setup
    
    * remove openai assistants int tests
    
    * improvements in int tests
    
    * fix env var
    
    * fix env vars
    
    * fix azure responses test
    
    * trigger actions
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: [BREAKING] Observability updates (#2782)
    * fixes Python: Add env_file_path parameter to setup_observability() similar to AzureOpenAIChatClient
    Fixes #2186
    
    * WIP on updates using configure_azure_monitor
    
    * improved setup and clarity
    
    * fixed root .env.example
    
    * revert changes
    
    * updated files
    
    * updated sample
    
    * updated zero code
    
    * test fixes and fixed links
    
    * fix devui
    
    * removed planning docs
    
    * added enable method and updated readme and samples
    
    * clarified docstring
    
    * add return annotation
    
    * updated naming
    
    * update capatilized version
    
    * updated readme and some fixes
    
    * updated decorator name inline with the rest
    
    * feedback from comments addressed
  • Python: Feature/azure ai search agentic rag (search as separate package) (#2328)
    * Python: Fix pyright errors and move search provider to core (#1546)
    
    * address pablo coments
    
    * update azure ai search pypi version to latest prev
    
    * init update
    
    * Fix MyPy type annotation errors in search provider
    
    - Add type annotation to DEFAULT_CONTEXT_PROMPT
    - Add type annotation to vectorizable_fields
    - Add union type annotation to vector_queries
    
    * Fix DEFAULT_CONTEXT_PROMPT MyPy error and update test
    
    - Rename DEFAULT_CONTEXT_PROMPT to _DEFAULT_SEARCH_CONTEXT_PROMPT to avoid conflict with base class Final variable
    - Update test to use new constant name
    - All core package tests passing (1123 passed)
    
    * Python: Move Azure AI Search to separate package per PR feedback
    
    Addresses reviewer feedback from PR #1546 by isolating the beta dependency
    (azure-search-documents==11.7.0b2) into a new agent-framework-aisearch package.
    
    Changes:
    - Created new agent-framework-aisearch package with complete structure
    - Moved AzureAISearchContextProvider from core to aisearch package
    - Added AzureAISearchSettings class for environment variable auto-loading
    - Added support for direct API key string (auto-converts to AzureKeyCredential)
    - Added azure_openai_api_key parameter for Knowledge Base authentication
    - Updated embedding_function type to Callable[[str], Awaitable[list[float]]]
    - Moved Role import to top-level imports
    - Maintained lazy loading through agent_framework.azure module
    - Removed beta dependency from core package
    - Updated all tests to use new package location
    - All quality checks pass: ruff format/lint, pyright, mypy (0 errors)
    - All 21 unit tests pass with 59% coverage
    
    Semantic search mode verified working with both API key and managed identity authentication.
    
    馃 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    
    * Python: Clarify top_k parameter only applies to semantic mode
    
    Updated documentation to clarify that the top_k parameter only affects
    semantic search mode. In agentic mode, the server-side Knowledge Base
    determines retrieval based on query complexity and reasoning effort.
    
    馃 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    
    * Python: Add Knowledge Base output mode and retrieval reasoning effort parameters
    
    Added support for configurable Knowledge Base behavior in agentic mode:
    
    - knowledge_base_output_mode: "extractive_data" (default) or "answer_synthesis"
      Some knowledge sources require answer_synthesis mode for proper functionality.
    
    - retrieval_reasoning_effort: "minimal" (default), "medium", or "low"
      Controls query planning complexity and multi-hop reasoning depth.
    
    These parameters give users fine-grained control over Knowledge Base behavior
    and enable support for knowledge sources that require answer synthesis.
    
    馃 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    
    * effort and outputmode query params
    
    * Address PR review feedback for Azure AI Search context provider
    
    * comments eduward
    
    * ed latest comments
    
    ---------
    
    Co-authored-by: Farzad Sunavala <farzad.sunavala.enovate.ai>
    Co-authored-by: farzad528 <farzad528@users.noreply.github.com>
    Co-authored-by: Claude <noreply@anthropic.com>
  • Python: Added Ollama example using OpenAIChatClient (#1100)
    * Added Ollama example using OpenAIChatClient
    
    * Small improvement
  • Python: Fix Azure AI Getting Started samples: Improve documentation and code readability (#1089)
    * Initial plan
    
    * Fix Azure AI samples: Add dotenv support, fix async input, improve docs
    
    Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>
    
    * Remove dotenv.load_dotenv() and revert async input() changes per review feedback
    
    Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: dmytrostruk <13853051+dmytrostruk@users.noreply.github.com>
  • [BREAKING] Python: Observability cleanup (#905)
    * Further observability cleanup and update telemetry samples
    
    * Add VS Code Extension config
    
    * Fix unit tests
    
    * Fix unit tests
    
    * Add more comments
    
    * Remove live metric
  • Python: [BREAKING] updated structure and samples (#875)
    * updated structure and samples
    
    * updated names and removed cross tests
    
    * updated projects etc
    
    * updated tests
    
    * updated test
    
    * test fixes
    
    * removed devui for now
    
    * updated all-tests task
    
    * removed old style configs
    
    * remove coverage from tests
    
    * updated to unit tests with all-tests
    
    * updated foundry everywhere
    
    * fix azure ai tests
    
    * fix merge tests
    
    * fix mypy
  • Python: Telemetry and observability follow-up (#833)
    * updated telemetry work
    
    * updated telemetry
    
    * slight improvement
    
    * updated tests
    
    * fixes for telemetry
    
    * fixes for mypy
    
    * added settings setup to runner to avoid error
    
    * streamline usage
    
    * updated tests
    
    * updated tests
    
    * further refinement
    
    * fix dumped item for otel
    
    * removed enable_workflow_otel
    
    * final fixes
    
    * final fixes
    
    * updated samples
    
    * removed exporters
    
    * fix tests
    
    * fixed last import'
    
    * fixed devui
  • Python: Added Anthropic agent example (#850)
    * Added Anthropic example
    
    * Small fix
  • Python: Added Copilot Studio Agent (#722)
    * Small fix in dotnet conformance tests
    
    * Added CopilotStudioAgent implementation
    
    * Added examples
    
    * Updated package README
    
    * Small fixes
    
    * Small improvements
    
    * Fixed dotnet tests
    
    * Add unit tests
    
    * Updated tests
    
    * Small updates
    
    * Small test fixes
    
    * Revert "Small test fixes"
    
    This reverts commit 983ac44a70.
    
    * Small fixes in documentation
    
    * Updated test configuration
    
    * Revert "Updated test configuration"
    
    This reverts commit 2a16fea815.
    
    * Small fix
    
    * Reverted TODO item
    
    * Small suppressions
    
    * More fixes
    
    * Small fixes
    
    * Fixed tests
    
    * Removed disallow_any_unimported rule in all packages
    
    * Fixes
  • Python: Context providers abstraction and Mem0 implementation (#631)
    * Added context provider abstractions
    
    * Added mem0 implementation
    
    * Example and small fixes
    
    * Added unit tests for agent
    
    * Added unit tests for mem0 provider
    
    * Updated README
    
    * Small doc updates
    
    * Update python/packages/mem0/agent_framework_mem0/_provider.py
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Small fixes in tests
    
    * Renaming based on PR feedback
    
    * Small fixes
    
    * Added tests for AggregateContextProvider
    
    * Small improvements
    
    * More improvements based on PR feedback
    
    * Small constant update
    
    * Added more examples
    
    * Added README for Mem0 examples
    
    * Small updates to API
    
    * Updated initialization logic
    
    * Updates for context manager
    
    * Updated Context class
    
    * Dependency update
    
    * Revert changes
    
    * Fixed tests
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
  • Python: Improved telemetry setup (#421)
    * test with stack and simplified names
    
    * quick demo of agent decorator
    
    * moved builder to protocol to enhance functionality
    
    * undid chatclientAgent -> agent rename
    
    * one more
    
    * reverted AIAgent rename
    
    * final reverts
    
    * fixed foundry import
    
    * revert changes
    
    * streamlined otel and fcc decorators
    
    * cleanup of telemetry
    
    * further refinement
    
    * lots of updates
    
    * fixed typing
    
    * fix for mypy
    
    * added input and output atttributes
    
    * fix import
    
    * initial work on baking in otel
    
    * major update to telemetry
    
    * final fixes after rename
    
    * fix
    
    * fix test
    
    * updated tests
    
    * fix for tests
    
    * fixes for tests
    
    * updated based on comments
    
    * removed agent decorator
    
    * fix for Python: ServiceResponseException when using multiple tools
    Fixes #649
    
    * addressed comments
    
    * fix tests
    
    * fix tests
    
    * fix tools tests
    
    * fix for conversation_id in assistants client
    
    * fix responses test
    
    * fix tests and mypy
    
    * updated test
    
    * foundry fix
    
    ---------
    
    Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
  • Python: Documentation updates (#538)
    * Added README for each sample sub-folder
    
    * More documentation updates