agentbyte 0.4.7__tar.gz → 0.4.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. {agentbyte-0.4.7 → agentbyte-0.4.8}/CHANGELOG.md +15 -0
  2. {agentbyte-0.4.7 → agentbyte-0.4.8}/PKG-INFO +11 -3
  3. {agentbyte-0.4.7 → agentbyte-0.4.8}/README.md +10 -2
  4. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/__about__.py +1 -1
  5. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/__init__.py +3 -0
  6. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/azure/chat.py +36 -90
  7. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/azure/embedding.py +35 -49
  8. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/base.py +4 -2
  9. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/openai/chat.py +30 -90
  10. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/openai/embedding.py +29 -49
  11. agentbyte-0.4.8/src/agentbyte/llm/retry_policy.py +130 -0
  12. agentbyte-0.4.8/tests/llm/test_retry_policy_api.py +120 -0
  13. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/test_package_api.py +2 -0
  14. {agentbyte-0.4.7 → agentbyte-0.4.8}/.github/skills/agentbyte-agent-as-tool/SKILL.md +0 -0
  15. {agentbyte-0.4.7 → agentbyte-0.4.8}/.github/skills/agentbyte-ai-driven-orchestration/SKILL.md +0 -0
  16. {agentbyte-0.4.7 → agentbyte-0.4.8}/.github/skills/agentbyte-dataset/SKILL.md +0 -0
  17. {agentbyte-0.4.7 → agentbyte-0.4.8}/.github/skills/agentbyte-function-tools/SKILL.md +0 -0
  18. {agentbyte-0.4.7 → agentbyte-0.4.8}/.github/skills/agentbyte-list-memory/SKILL.md +0 -0
  19. {agentbyte-0.4.7 → agentbyte-0.4.8}/.github/skills/agentbyte-llm-client/SKILL.md +0 -0
  20. {agentbyte-0.4.7 → agentbyte-0.4.8}/.github/skills/agentbyte-memory-tool/SKILL.md +0 -0
  21. {agentbyte-0.4.7 → agentbyte-0.4.8}/.github/skills/agentbyte-middleware/SKILL.md +0 -0
  22. {agentbyte-0.4.7 → agentbyte-0.4.8}/.github/skills/agentbyte-multi-turn-context/SKILL.md +0 -0
  23. {agentbyte-0.4.7 → agentbyte-0.4.8}/.github/skills/agentbyte-otel-tracing/SKILL.md +0 -0
  24. {agentbyte-0.4.7 → agentbyte-0.4.8}/.github/skills/agentbyte-plan-based-orchestration/SKILL.md +0 -0
  25. {agentbyte-0.4.7 → agentbyte-0.4.8}/.github/skills/agentbyte-round-robin-orchestration/SKILL.md +0 -0
  26. {agentbyte-0.4.7 → agentbyte-0.4.8}/.github/skills/agentbyte-simple-agent/SKILL.md +0 -0
  27. {agentbyte-0.4.7 → agentbyte-0.4.8}/.github/skills/agentbyte-tool-approval/SKILL.md +0 -0
  28. {agentbyte-0.4.7 → agentbyte-0.4.8}/.github/skills/skill-authoring/SKILL.md +0 -0
  29. {agentbyte-0.4.7 → agentbyte-0.4.8}/.gitignore +0 -0
  30. {agentbyte-0.4.7 → agentbyte-0.4.8}/LICENSE +0 -0
  31. {agentbyte-0.4.7 → agentbyte-0.4.8}/pyproject.toml +0 -0
  32. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/__init__.py +0 -0
  33. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/agents/__init__.py +0 -0
  34. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/agents/agent.py +0 -0
  35. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/agents/agent_as_tool.py +0 -0
  36. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/agents/base.py +0 -0
  37. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/agents/types.py +0 -0
  38. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/cancellation_token.py +0 -0
  39. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/cli/__init__.py +0 -0
  40. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/cli/main.py +0 -0
  41. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/component.py +0 -0
  42. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/context.py +0 -0
  43. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/dataset/__init__.py +0 -0
  44. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/dataset/base.py +0 -0
  45. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/dataset/json.py +0 -0
  46. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/dataset/loader.py +0 -0
  47. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/dataset/loaders.py +0 -0
  48. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/dataset/sqlite.py +0 -0
  49. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/entity.py +0 -0
  50. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/_retry_observability.py +0 -0
  51. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/auth.py +0 -0
  52. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/azure/__init__.py +0 -0
  53. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/azure/auth.py +0 -0
  54. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/azure/settings.py +0 -0
  55. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/azure_openai.py +0 -0
  56. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/azure_openai_embedding.py +0 -0
  57. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/embeddings_base.py +0 -0
  58. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/openai/__init__.py +0 -0
  59. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/openai/settings.py +0 -0
  60. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/openai.py +0 -0
  61. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/openai_embedding.py +0 -0
  62. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/pricing.py +0 -0
  63. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/settings.py +0 -0
  64. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/llm/types.py +0 -0
  65. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/memory/__init__.py +0 -0
  66. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/memory/base.py +0 -0
  67. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/messages.py +0 -0
  68. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/middleware/__init__.py +0 -0
  69. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/middleware/base.py +0 -0
  70. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/middleware/otel.py +0 -0
  71. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/middleware/retry.py +0 -0
  72. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/notebook.py +0 -0
  73. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/orchestration/__init__.py +0 -0
  74. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/orchestration/ai.py +0 -0
  75. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/orchestration/base.py +0 -0
  76. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/orchestration/plan.py +0 -0
  77. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/orchestration/round_robin.py +0 -0
  78. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/presets/__init__.py +0 -0
  79. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/presets/agents.py +0 -0
  80. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/presets/clients.py +0 -0
  81. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/presets/orchestration.py +0 -0
  82. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/presets/workflow.py +0 -0
  83. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/session.py +0 -0
  84. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/termination/__init__.py +0 -0
  85. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/termination/base.py +0 -0
  86. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/termination/cancellation.py +0 -0
  87. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/termination/composite.py +0 -0
  88. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/termination/external.py +0 -0
  89. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/termination/function_call.py +0 -0
  90. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/termination/handoff.py +0 -0
  91. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/termination/max_message.py +0 -0
  92. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/termination/text_mention.py +0 -0
  93. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/termination/timeout.py +0 -0
  94. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/termination/token_usage.py +0 -0
  95. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/tools/__init__.py +0 -0
  96. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/tools/base.py +0 -0
  97. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/tools/core_tools.py +0 -0
  98. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/tools/decorator.py +0 -0
  99. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/tools/memory_tool.py +0 -0
  100. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/types.py +0 -0
  101. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/__init__.py +0 -0
  102. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/agent_framework_devui/ui/assets/index-BzhEszHZ.css +0 -0
  103. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/agent_framework_devui/ui/assets/index-DByFJNGD.js +0 -0
  104. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/agent_framework_devui/ui/index.html +0 -0
  105. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/agent_framework_devui/ui/vite.svg +0 -0
  106. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/discovery.py +0 -0
  107. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/execution.py +0 -0
  108. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/.gitignore +0 -0
  109. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/README.md +0 -0
  110. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/components.json +0 -0
  111. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/eslint.config.js +0 -0
  112. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/index.html +0 -0
  113. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/package.json +0 -0
  114. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/plan.md +0 -0
  115. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/public/vite.svg +0 -0
  116. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/App.css +0 -0
  117. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/App.tsx +0 -0
  118. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/assets/react.svg +0 -0
  119. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/agent/agent-view.tsx +0 -0
  120. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/message_renderer/ContentRenderer.tsx +0 -0
  121. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/message_renderer/MessageRenderer.tsx +0 -0
  122. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/message_renderer/index.ts +0 -0
  123. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/message_renderer/types.ts +0 -0
  124. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/mode-toggle.tsx +0 -0
  125. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/orchestrator/orchestrator-view.tsx +0 -0
  126. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/shared/app-header.tsx +0 -0
  127. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/shared/chat-base.tsx +0 -0
  128. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/shared/context-inspector.tsx +0 -0
  129. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/shared/debug-panel.tsx +0 -0
  130. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/shared/entity-selector.tsx +0 -0
  131. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/shared/example-tasks-display.tsx +0 -0
  132. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/shared/examples-gallery.tsx +0 -0
  133. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/shared/session-switcher.tsx +0 -0
  134. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/shared/tool-approval-banner.tsx +0 -0
  135. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/theme-provider.tsx +0 -0
  136. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/ui/attachment-gallery.tsx +0 -0
  137. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/ui/badge.tsx +0 -0
  138. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/ui/button.tsx +0 -0
  139. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/ui/card.tsx +0 -0
  140. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/ui/dialog.tsx +0 -0
  141. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/ui/dropdown-menu.tsx +0 -0
  142. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/ui/file-upload.tsx +0 -0
  143. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/ui/input.tsx +0 -0
  144. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/ui/label.tsx +0 -0
  145. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/ui/loading-spinner.tsx +0 -0
  146. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/ui/loading-state.tsx +0 -0
  147. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/ui/message-input.tsx +0 -0
  148. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/ui/scroll-area.tsx +0 -0
  149. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/ui/slider.tsx +0 -0
  150. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/ui/tabs.tsx +0 -0
  151. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/ui/textarea.tsx +0 -0
  152. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/components/workflow/workflow-view.tsx +0 -0
  153. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/hooks/messageHandlers.ts +0 -0
  154. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/hooks/useEntityExecution.ts +0 -0
  155. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/index.css +0 -0
  156. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/main.tsx +0 -0
  157. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/services/api.ts +0 -0
  158. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/types/index.ts +0 -0
  159. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/types/picoagents.ts +0 -0
  160. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/utils/message-utils.ts +0 -0
  161. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/src/vite-env.d.ts +0 -0
  162. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/tsconfig.app.json +0 -0
  163. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/tsconfig.json +0 -0
  164. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/tsconfig.node.json +0 -0
  165. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/vite.config.ts +0 -0
  166. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/frontend/yarn.lock +0 -0
  167. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/models.py +0 -0
  168. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/registry.py +0 -0
  169. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/server.py +0 -0
  170. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/session_store.py +0 -0
  171. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/sessions.py +0 -0
  172. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/ui/assets/index-CWk64UM3.js +0 -0
  173. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/ui/assets/index-vt1cujlT.css +0 -0
  174. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/ui/index.html +0 -0
  175. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/webui/ui/vite.svg +0 -0
  176. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/workflow/__init__.py +0 -0
  177. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/workflow/core/__init__.py +0 -0
  178. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/workflow/core/checkpoint.py +0 -0
  179. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/workflow/core/models.py +0 -0
  180. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/workflow/core/runner.py +0 -0
  181. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/workflow/core/workflow.py +0 -0
  182. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/workflow/defaults.py +0 -0
  183. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/workflow/schema_utils.py +0 -0
  184. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/workflow/steps/__init__.py +0 -0
  185. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/workflow/steps/agentbyte_agent.py +0 -0
  186. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/workflow/steps/echo.py +0 -0
  187. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/workflow/steps/function.py +0 -0
  188. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/workflow/steps/http.py +0 -0
  189. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/workflow/steps/step.py +0 -0
  190. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/workflow/steps/transform.py +0 -0
  191. {agentbyte-0.4.7 → agentbyte-0.4.8}/src/agentbyte/workflow/visualizer.py +0 -0
  192. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/agents/test_agent_as_tool.py +0 -0
  193. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/agents/test_agent_basic.py +0 -0
  194. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/agents/test_agent_event_types.py +0 -0
  195. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/agents/test_agent_memory_integration.py +0 -0
  196. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/agents/test_agent_middleware_integration.py +0 -0
  197. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/agents/test_agent_retry_middleware.py +0 -0
  198. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/agents/test_agent_stream_events.py +0 -0
  199. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/agents/test_tool_approval.py +0 -0
  200. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/cli/test_create_skills.py +0 -0
  201. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/llm/test_azure_client.py +0 -0
  202. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/llm/test_azure_embedding_client.py +0 -0
  203. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/llm/test_llm_types.py +0 -0
  204. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/llm/test_openai_client.py +0 -0
  205. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/llm/test_openai_embedding_client.py +0 -0
  206. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/llm/test_retry_observability.py +0 -0
  207. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/memory/test_memory.py +0 -0
  208. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/middleware/test_middleware_chain.py +0 -0
  209. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/middleware/test_otel.py +0 -0
  210. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/middleware/test_retry_middleware.py +0 -0
  211. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/orchestration/test_ai_orchestrator.py +0 -0
  212. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/orchestration/test_base_orchestrator.py +0 -0
  213. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/orchestration/test_plan_orchestrator.py +0 -0
  214. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/orchestration/test_round_robin.py +0 -0
  215. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/presets/test_agents.py +0 -0
  216. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/presets/test_clients.py +0 -0
  217. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/presets/test_orchestration.py +0 -0
  218. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/presets/test_workflow.py +0 -0
  219. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/termination/test_base.py +0 -0
  220. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/termination/test_cancellation.py +0 -0
  221. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/termination/test_composite.py +0 -0
  222. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/termination/test_external.py +0 -0
  223. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/termination/test_function_call.py +0 -0
  224. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/termination/test_handoff.py +0 -0
  225. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/termination/test_max_message.py +0 -0
  226. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/termination/test_text_mention.py +0 -0
  227. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/termination/test_timeout.py +0 -0
  228. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/termination/test_token_usage.py +0 -0
  229. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/test_cancellation_token.py +0 -0
  230. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/test_context.py +0 -0
  231. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/test_messages.py +0 -0
  232. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/test_session.py +0 -0
  233. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/test_types.py +0 -0
  234. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/tools/test_memory_tool.py +0 -0
  235. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/tools/test_tools.py +0 -0
  236. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/webui/__init__.py +0 -0
  237. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/webui/helpers.py +0 -0
  238. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/webui/test_execution.py +0 -0
  239. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/webui/test_package_api.py +0 -0
  240. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/webui/test_registry.py +0 -0
  241. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/webui/test_server.py +0 -0
  242. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/workflow/test_checkpoint.py +0 -0
  243. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/workflow/test_workflow_class.py +0 -0
  244. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/workflow/test_workflow_models.py +0 -0
  245. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/workflow/test_workflow_runner.py +0 -0
  246. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/workflow/test_workflow_steps.py +0 -0
  247. {agentbyte-0.4.7 → agentbyte-0.4.8}/tests/workflow/test_workflow_visualizer.py +0 -0
@@ -4,6 +4,21 @@ All notable changes to Agentbyte are documented in this file.
4
4
 
5
5
  The format follows Keep a Changelog principles and semantic versioning.
6
6
 
7
+ ## [0.4.8] - 2026-04-06
8
+
9
+ ### Added
10
+ - Added `RetryPolicy` as a public Pydantic v2 model in `agentbyte.llm`. Exported from the package root so callers can define a policy once and share it across multiple clients.
11
+ - Added `RetryMixin` as a shared retry behaviour mixin used by all four provider clients. Provides a single implementation of `_retry_with_backoff` and `_retry_stream_with_backoff` replacing the six previously duplicated methods.
12
+ - All four client constructors (`OpenAIChatCompletionClient`, `AzureOpenAIChatCompletionClient`, `OpenAIEmbeddingClient`, `AzureOpenAIEmbeddingClient`) now accept `retry_policy=` directly. All Azure auth factories (`from_api_key`, `from_default_credential`, `from_certificate`, `from_ad_token`) accept `retry_policy=` on both chat and embedding clients.
13
+ - `RetryPolicy` is now the serialized form for all four provider config classes. `dump_component()` produces a nested `retry_policy` dict; `ComponentLoader.load_component()` restores it.
14
+
15
+ ### Changed
16
+ - Provider config classes (`OpenAIChatCompletionClientConfig`, `AzureOpenAIChatCompletionClientConfig`, `OpenAIEmbeddingClientConfig`, `AzureOpenAIEmbeddingClientConfig`) replace the three flat scalar fields (`max_retries`, `initial_retry_delay`, `max_retry_delay`) with a nested `retry_policy: RetryPolicy` field.
17
+ - `RetryPolicy` validation now rejects negative `max_retries`, negative delays, and configurations where `max_retry_delay < initial_retry_delay`.
18
+
19
+ ### Breaking
20
+ - Component config serialization shape changed: `retry_policy` is now a nested object rather than three flat keys. Any stored component configs must be migrated to the new shape.
21
+
7
22
  ## [0.4.7] - 2026-04-06
8
23
 
9
24
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentbyte
3
- Version: 0.4.7
3
+ Version: 0.4.8
4
4
  Summary: A toolkit for designing multiagent systems
5
5
  Project-URL: Homepage, https://gitlab.com/pyninja/aiengineering/agentbyte
6
6
  Project-URL: Repository, https://gitlab.com/pyninja/aiengineering/agentbyte
@@ -36,17 +36,25 @@ Requires-Dist: uvicorn>=0.42.0; extra == 'webui'
36
36
  Description-Content-Type: text/markdown
37
37
 
38
38
  <p align="center">
39
- <img src="https://gitlab.com/pyninja/aiengineering/agentbyte/-/raw/v0.4.7/logo/agent-byte-avatar-low.png" alt="Agentbyte" width="200"/>
39
+ <img src="https://gitlab.com/pyninja/aiengineering/agentbyte/-/raw/v0.4.8/logo/agent-byte-avatar-low.png" alt="Agentbyte" width="200"/>
40
40
  </p>
41
41
 
42
42
  # Agentbyte
43
43
 
44
44
  Agentbyte is an observability-first agentic AI framework for building and studying multiagent systems with a learning-first, implementation-oriented workflow.
45
45
 
46
- Current release: **0.4.7**
46
+ Current release: **0.4.8**
47
47
 
48
48
  Repository: [gitlab.com/pyninja/aiengineering/agentbyte](https://gitlab.com/pyninja/aiengineering/agentbyte)
49
49
 
50
+ ## What's New in 0.4.8
51
+
52
+ - Added `RetryPolicy` as a public Pydantic v2 model exported from `agentbyte.llm`. Define a policy once and share it across multiple clients.
53
+ - Unified retry logic: `RetryMixin` replaces six duplicated retry method implementations across the four provider clients with a single shared implementation.
54
+ - All four client constructors and all Azure auth factories now accept `retry_policy=` directly.
55
+ - Provider config serialization now uses a nested `retry_policy` object instead of three flat scalar fields.
56
+ - `RetryPolicy` validation rejects negative `max_retries`, negative delays, and inverted delay bounds.
57
+
50
58
  ## What's New in 0.4.7
51
59
 
52
60
  - Reorganised `agentbyte.llm` into provider packages: `agentbyte.llm.openai` and `agentbyte.llm.azure`. All existing flat `agentbyte.llm.*` imports continue to work via compatibility shims.
@@ -1,15 +1,23 @@
1
1
  <p align="center">
2
- <img src="https://gitlab.com/pyninja/aiengineering/agentbyte/-/raw/v0.4.7/logo/agent-byte-avatar-low.png" alt="Agentbyte" width="200"/>
2
+ <img src="https://gitlab.com/pyninja/aiengineering/agentbyte/-/raw/v0.4.8/logo/agent-byte-avatar-low.png" alt="Agentbyte" width="200"/>
3
3
  </p>
4
4
 
5
5
  # Agentbyte
6
6
 
7
7
  Agentbyte is an observability-first agentic AI framework for building and studying multiagent systems with a learning-first, implementation-oriented workflow.
8
8
 
9
- Current release: **0.4.7**
9
+ Current release: **0.4.8**
10
10
 
11
11
  Repository: [gitlab.com/pyninja/aiengineering/agentbyte](https://gitlab.com/pyninja/aiengineering/agentbyte)
12
12
 
13
+ ## What's New in 0.4.8
14
+
15
+ - Added `RetryPolicy` as a public Pydantic v2 model exported from `agentbyte.llm`. Define a policy once and share it across multiple clients.
16
+ - Unified retry logic: `RetryMixin` replaces six duplicated retry method implementations across the four provider clients with a single shared implementation.
17
+ - All four client constructors and all Azure auth factories now accept `retry_policy=` directly.
18
+ - Provider config serialization now uses a nested `retry_policy` object instead of three flat scalar fields.
19
+ - `RetryPolicy` validation rejects negative `max_retries`, negative delays, and inverted delay bounds.
20
+
13
21
  ## What's New in 0.4.7
14
22
 
15
23
  - Reorganised `agentbyte.llm` into provider packages: `agentbyte.llm.openai` and `agentbyte.llm.azure`. All existing flat `agentbyte.llm.*` imports continue to work via compatibility shims.
@@ -1,2 +1,2 @@
1
- __version__ = "0.4.7"
1
+ __version__ = "0.4.8"
2
2
  VERSION = __version__
@@ -31,6 +31,7 @@ from .base import (
31
31
  AuthenticationError,
32
32
  InvalidRequestError,
33
33
  )
34
+ from .retry_policy import RetryPolicy
34
35
  from .embeddings_base import BaseEmbeddingClient, BaseEmbeddingClientConfig
35
36
  from .openai import OpenAIChatCompletionClient, OpenAIChatCompletionClientConfig
36
37
  from .openai import OpenAIEmbeddingClient, OpenAIEmbeddingClientConfig
@@ -93,6 +94,8 @@ __all__ = [
93
94
  "OpenAISettings",
94
95
  "AzureOpenAISettings",
95
96
  "AzureServicePrincipalSettings",
97
+ # Retry policy
98
+ "RetryPolicy",
96
99
  # Exception types
97
100
  "ModelClientError",
98
101
  "RateLimitError",
@@ -2,12 +2,11 @@
2
2
  Azure OpenAI chat completion client implementation.
3
3
  """
4
4
 
5
- import asyncio
6
5
  import json
7
6
  import logging
8
7
  import time
9
8
  from collections.abc import AsyncGenerator
10
- from typing import Any, Callable, Dict, List, Optional, TypeVar
9
+ from typing import Any, Dict, List, Optional, TypeVar
11
10
 
12
11
  from openai import AsyncAzureOpenAI
13
12
 
@@ -15,7 +14,7 @@ from agentbyte.messages import AssistantMessage, Message, ToolCallRequest
15
14
 
16
15
  from agentbyte.component import Component
17
16
 
18
- from .._retry_observability import build_retry_record, build_retry_summary
17
+ from .._retry_observability import build_retry_summary
19
18
  from ..base import (
20
19
  BaseChatCompletionClient,
21
20
  BaseChatCompletionClientConfig,
@@ -24,6 +23,7 @@ from ..base import (
24
23
  InvalidRequestError,
25
24
  )
26
25
  from ..pricing import PricingRegistry
26
+ from ..retry_policy import RetryMixin, RetryPolicy
27
27
  from ..types import (
28
28
  ChatCompletionChunk,
29
29
  ChatCompletionResult,
@@ -40,9 +40,7 @@ T = TypeVar("T")
40
40
  class AzureOpenAIChatCompletionClientConfig(BaseChatCompletionClientConfig):
41
41
  """Configuration for AzureOpenAIChatCompletionClient serialization."""
42
42
 
43
- max_retries: int = 3
44
- initial_retry_delay: float = 1.0
45
- max_retry_delay: float = 60.0
43
+ retry_policy: RetryPolicy = RetryPolicy()
46
44
  key_env_var: str = "AZURE_OPENAI_API_KEY"
47
45
  deployment_env_var: str = "AZURE_OPENAI_CHAT_DEPLOYMENT_NAME"
48
46
  api_version_env_var: str = "AZURE_OPENAI_API_VERSION"
@@ -51,6 +49,7 @@ class AzureOpenAIChatCompletionClientConfig(BaseChatCompletionClientConfig):
51
49
  class AzureOpenAIChatCompletionClient(
52
50
  BaseChatCompletionClient,
53
51
  Component[AzureOpenAIChatCompletionClientConfig],
52
+ RetryMixin,
54
53
  ):
55
54
  """Azure OpenAI chat completion client."""
56
55
 
@@ -67,12 +66,30 @@ class AzureOpenAIChatCompletionClient(
67
66
  max_retries: int = 3,
68
67
  initial_retry_delay: float = 1.0,
69
68
  max_retry_delay: float = 60.0,
69
+ retry_policy: Optional[RetryPolicy] = None,
70
70
  ):
71
71
  super().__init__(model, client, config)
72
72
  self.model_pricing = model_pricing
73
- self.max_retries = max_retries
74
- self.initial_retry_delay = initial_retry_delay
75
- self.max_retry_delay = max_retry_delay
73
+ if retry_policy is not None:
74
+ self.retry_policy = retry_policy
75
+ else:
76
+ self.retry_policy = RetryPolicy(
77
+ max_retries=max_retries,
78
+ initial_retry_delay=initial_retry_delay,
79
+ max_retry_delay=max_retry_delay,
80
+ )
81
+
82
+ @property
83
+ def max_retries(self) -> int:
84
+ return self.retry_policy.max_retries
85
+
86
+ @property
87
+ def initial_retry_delay(self) -> float:
88
+ return self.retry_policy.initial_retry_delay
89
+
90
+ @property
91
+ def max_retry_delay(self) -> float:
92
+ return self.retry_policy.max_retry_delay
76
93
 
77
94
  @classmethod
78
95
  def from_api_key(
@@ -86,6 +103,7 @@ class AzureOpenAIChatCompletionClient(
86
103
  max_retries: int = 3,
87
104
  initial_retry_delay: float = 1.0,
88
105
  max_retry_delay: float = 60.0,
106
+ retry_policy: Optional[RetryPolicy] = None,
89
107
  ) -> "AzureOpenAIChatCompletionClient":
90
108
  """Create a client using an Azure OpenAI API key."""
91
109
  from pydantic import ValidationError
@@ -134,6 +152,7 @@ class AzureOpenAIChatCompletionClient(
134
152
  max_retries=max_retries,
135
153
  initial_retry_delay=initial_retry_delay,
136
154
  max_retry_delay=max_retry_delay,
155
+ retry_policy=retry_policy,
137
156
  )
138
157
 
139
158
  @classmethod
@@ -148,6 +167,7 @@ class AzureOpenAIChatCompletionClient(
148
167
  max_retries: int = 3,
149
168
  initial_retry_delay: float = 1.0,
150
169
  max_retry_delay: float = 60.0,
170
+ retry_policy: Optional[RetryPolicy] = None,
151
171
  ) -> "AzureOpenAIChatCompletionClient":
152
172
  """Create a client using DefaultAzureCredential."""
153
173
  try:
@@ -198,6 +218,7 @@ class AzureOpenAIChatCompletionClient(
198
218
  max_retries=max_retries,
199
219
  initial_retry_delay=initial_retry_delay,
200
220
  max_retry_delay=max_retry_delay,
221
+ retry_policy=retry_policy,
201
222
  )
202
223
 
203
224
  @classmethod
@@ -213,6 +234,7 @@ class AzureOpenAIChatCompletionClient(
213
234
  max_retries: int = 3,
214
235
  initial_retry_delay: float = 1.0,
215
236
  max_retry_delay: float = 60.0,
237
+ retry_policy: Optional[RetryPolicy] = None,
216
238
  ) -> "AzureOpenAIChatCompletionClient":
217
239
  """Create a client using certificate-based Azure AD service principal auth."""
218
240
  from pydantic import ValidationError
@@ -271,6 +293,7 @@ class AzureOpenAIChatCompletionClient(
271
293
  max_retries=max_retries,
272
294
  initial_retry_delay=initial_retry_delay,
273
295
  max_retry_delay=max_retry_delay,
296
+ retry_policy=retry_policy,
274
297
  )
275
298
 
276
299
  @classmethod
@@ -285,6 +308,7 @@ class AzureOpenAIChatCompletionClient(
285
308
  max_retries: int = 3,
286
309
  initial_retry_delay: float = 1.0,
287
310
  max_retry_delay: float = 60.0,
311
+ retry_policy: Optional[RetryPolicy] = None,
288
312
  ) -> "AzureOpenAIChatCompletionClient":
289
313
  """Create a client using a pre-fetched Azure AD bearer token."""
290
314
  from pydantic import ValidationError
@@ -326,83 +350,9 @@ class AzureOpenAIChatCompletionClient(
326
350
  max_retries=max_retries,
327
351
  initial_retry_delay=initial_retry_delay,
328
352
  max_retry_delay=max_retry_delay,
353
+ retry_policy=retry_policy,
329
354
  )
330
355
 
331
- async def _retry_with_backoff(
332
- self,
333
- func: Callable[..., Any],
334
- *args: Any,
335
- _retry_history: Optional[List] = None,
336
- **kwargs: Any,
337
- ) -> Any:
338
- """Execute a function with exponential backoff retry logic."""
339
- last_exception = None
340
- current_delay = self.initial_retry_delay
341
-
342
- for attempt in range(self.max_retries + 1):
343
- try:
344
- return await func(*args, **kwargs)
345
- except (RateLimitError, ModelClientError) as e:
346
- last_exception = e
347
-
348
- if attempt >= self.max_retries:
349
- logger.warning(
350
- f"Max retries ({self.max_retries}) reached for {func.__name__}"
351
- )
352
- raise
353
-
354
- if _retry_history is not None:
355
- _retry_history.append(
356
- build_retry_record(attempt + 1, current_delay, type(e), "retrying")
357
- )
358
-
359
- logger.debug(
360
- f"Transient error in {func.__name__} "
361
- f"(attempt {attempt + 1}/{self.max_retries + 1}): {e}. "
362
- f"Retrying in {current_delay:.1f}s"
363
- )
364
- await asyncio.sleep(current_delay)
365
- current_delay = min(current_delay * 2, self.max_retry_delay)
366
-
367
- except (AuthenticationError, InvalidRequestError) as e:
368
- logger.error(f"Non-transient error in {func.__name__}: {e}")
369
- raise
370
-
371
- except Exception as e:
372
- logger.error(f"Unexpected error in {func.__name__}: {e}")
373
- raise
374
-
375
- raise last_exception or ModelClientError("Retry logic error")
376
-
377
- async def _retry_stream_with_backoff(
378
- self,
379
- func: Callable[..., AsyncGenerator[ChatCompletionChunk, None]],
380
- *args: Any,
381
- **kwargs: Any,
382
- ) -> AsyncGenerator[ChatCompletionChunk, None]:
383
- """Execute a streaming function with exponential backoff retry logic."""
384
- current_delay = self.initial_retry_delay
385
-
386
- for attempt in range(self.max_retries + 1):
387
- saw_chunk = False
388
- try:
389
- async for chunk in func(*args, **kwargs):
390
- saw_chunk = True
391
- yield chunk
392
- return
393
- except (RateLimitError, ModelClientError) as e:
394
- if saw_chunk or attempt >= self.max_retries:
395
- raise
396
- logger.debug(
397
- f"Transient stream error in {func.__name__} "
398
- f"(attempt {attempt + 1}/{self.max_retries + 1}): {e}. "
399
- f"Retrying in {current_delay:.1f}s"
400
- )
401
- await asyncio.sleep(current_delay)
402
- current_delay = min(current_delay * 2, self.max_retry_delay)
403
- except (AuthenticationError, InvalidRequestError):
404
- raise
405
-
406
356
  async def create(
407
357
  self,
408
358
  messages: List[Message],
@@ -682,9 +632,7 @@ class AzureOpenAIChatCompletionClient(
682
632
  return AzureOpenAIChatCompletionClientConfig(
683
633
  model=self.model,
684
634
  config=self.config.copy(),
685
- max_retries=self.max_retries,
686
- initial_retry_delay=self.initial_retry_delay,
687
- max_retry_delay=self.max_retry_delay,
635
+ retry_policy=self.retry_policy,
688
636
  key_env_var=getattr(self, "_key_env_var", "AZURE_OPENAI_API_KEY"),
689
637
  deployment_env_var=getattr(self, "_deployment_env_var", "AZURE_OPENAI_CHAT_DEPLOYMENT_NAME"),
690
638
  api_version_env_var=getattr(self, "_api_version_env_var", "AZURE_OPENAI_API_VERSION"),
@@ -707,9 +655,7 @@ class AzureOpenAIChatCompletionClient(
707
655
  model=config.model if config.model != "gpt-4.1-mini" else None,
708
656
  api_key=resolved_key,
709
657
  config=config.config or None,
710
- max_retries=config.max_retries,
711
- initial_retry_delay=config.initial_retry_delay,
712
- max_retry_delay=config.max_retry_delay,
658
+ retry_policy=config.retry_policy,
713
659
  )
714
660
  instance._key_env_var = config.key_env_var
715
661
  instance._deployment_env_var = config.deployment_env_var
@@ -2,7 +2,6 @@
2
2
  Azure OpenAI embeddings client implementation.
3
3
  """
4
4
 
5
- import asyncio
6
5
  import logging
7
6
  import time
8
7
  from typing import Any, Dict, List, Optional
@@ -12,10 +11,11 @@ from openai import AsyncAzureOpenAI
12
11
  from agentbyte.component import Component
13
12
  from agentbyte.middleware.base import BaseMiddleware
14
13
 
15
- from .._retry_observability import build_retry_record, build_retry_summary
14
+ from .._retry_observability import build_retry_summary
16
15
  from ..base import AuthenticationError, InvalidRequestError, RateLimitError
17
16
  from ..embeddings_base import BaseEmbeddingClient, BaseEmbeddingClientConfig
18
17
  from ..pricing import PricingRegistry
18
+ from ..retry_policy import RetryMixin, RetryPolicy
19
19
  from ..types import EmbeddingResult, ModelClientError, ModelPricing, Usage
20
20
 
21
21
  logger = logging.getLogger(__name__)
@@ -24,9 +24,7 @@ logger = logging.getLogger(__name__)
24
24
  class AzureOpenAIEmbeddingClientConfig(BaseEmbeddingClientConfig):
25
25
  """Configuration for AzureOpenAIEmbeddingClient serialization."""
26
26
 
27
- max_retries: int = 3
28
- initial_retry_delay: float = 1.0
29
- max_retry_delay: float = 60.0
27
+ retry_policy: RetryPolicy = RetryPolicy()
30
28
  key_env_var: str = "AZURE_OPENAI_API_KEY"
31
29
  deployment_env_var: str = "AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME"
32
30
  api_version_env_var: str = "AZURE_OPENAI_API_VERSION"
@@ -35,6 +33,7 @@ class AzureOpenAIEmbeddingClientConfig(BaseEmbeddingClientConfig):
35
33
  class AzureOpenAIEmbeddingClient(
36
34
  BaseEmbeddingClient,
37
35
  Component[AzureOpenAIEmbeddingClientConfig],
36
+ RetryMixin,
38
37
  ):
39
38
  """Azure OpenAI embeddings client with single and batch methods."""
40
39
 
@@ -52,12 +51,30 @@ class AzureOpenAIEmbeddingClient(
52
51
  max_retries: int = 3,
53
52
  initial_retry_delay: float = 1.0,
54
53
  max_retry_delay: float = 60.0,
54
+ retry_policy: Optional[RetryPolicy] = None,
55
55
  ):
56
56
  super().__init__(model, client, config, middlewares=middlewares)
57
57
  self.model_pricing = model_pricing
58
- self.max_retries = max_retries
59
- self.initial_retry_delay = initial_retry_delay
60
- self.max_retry_delay = max_retry_delay
58
+ if retry_policy is not None:
59
+ self.retry_policy = retry_policy
60
+ else:
61
+ self.retry_policy = RetryPolicy(
62
+ max_retries=max_retries,
63
+ initial_retry_delay=initial_retry_delay,
64
+ max_retry_delay=max_retry_delay,
65
+ )
66
+
67
+ @property
68
+ def max_retries(self) -> int:
69
+ return self.retry_policy.max_retries
70
+
71
+ @property
72
+ def initial_retry_delay(self) -> float:
73
+ return self.retry_policy.initial_retry_delay
74
+
75
+ @property
76
+ def max_retry_delay(self) -> float:
77
+ return self.retry_policy.max_retry_delay
61
78
 
62
79
  @classmethod
63
80
  def from_api_key(
@@ -72,6 +89,7 @@ class AzureOpenAIEmbeddingClient(
72
89
  max_retries: int = 3,
73
90
  initial_retry_delay: float = 1.0,
74
91
  max_retry_delay: float = 60.0,
92
+ retry_policy: Optional[RetryPolicy] = None,
75
93
  ) -> "AzureOpenAIEmbeddingClient":
76
94
  """Create client using Azure OpenAI API key authentication."""
77
95
  from pydantic import ValidationError
@@ -121,6 +139,7 @@ class AzureOpenAIEmbeddingClient(
121
139
  max_retries=max_retries,
122
140
  initial_retry_delay=initial_retry_delay,
123
141
  max_retry_delay=max_retry_delay,
142
+ retry_policy=retry_policy,
124
143
  )
125
144
 
126
145
  @classmethod
@@ -136,6 +155,7 @@ class AzureOpenAIEmbeddingClient(
136
155
  max_retries: int = 3,
137
156
  initial_retry_delay: float = 1.0,
138
157
  max_retry_delay: float = 60.0,
158
+ retry_policy: Optional[RetryPolicy] = None,
139
159
  ) -> "AzureOpenAIEmbeddingClient":
140
160
  """Create client using DefaultAzureCredential token provider."""
141
161
  try:
@@ -187,6 +207,7 @@ class AzureOpenAIEmbeddingClient(
187
207
  max_retries=max_retries,
188
208
  initial_retry_delay=initial_retry_delay,
189
209
  max_retry_delay=max_retry_delay,
210
+ retry_policy=retry_policy,
190
211
  )
191
212
 
192
213
  @classmethod
@@ -203,6 +224,7 @@ class AzureOpenAIEmbeddingClient(
203
224
  max_retries: int = 3,
204
225
  initial_retry_delay: float = 1.0,
205
226
  max_retry_delay: float = 60.0,
227
+ retry_policy: Optional[RetryPolicy] = None,
206
228
  ) -> "AzureOpenAIEmbeddingClient":
207
229
  """Create client using certificate-based Azure AD authentication."""
208
230
  from pydantic import ValidationError
@@ -262,6 +284,7 @@ class AzureOpenAIEmbeddingClient(
262
284
  max_retries=max_retries,
263
285
  initial_retry_delay=initial_retry_delay,
264
286
  max_retry_delay=max_retry_delay,
287
+ retry_policy=retry_policy,
265
288
  )
266
289
 
267
290
  @classmethod
@@ -277,6 +300,7 @@ class AzureOpenAIEmbeddingClient(
277
300
  max_retries: int = 3,
278
301
  initial_retry_delay: float = 1.0,
279
302
  max_retry_delay: float = 60.0,
303
+ retry_policy: Optional[RetryPolicy] = None,
280
304
  ) -> "AzureOpenAIEmbeddingClient":
281
305
  """Create client using a pre-fetched Azure AD bearer token."""
282
306
  from pydantic import ValidationError
@@ -319,43 +343,9 @@ class AzureOpenAIEmbeddingClient(
319
343
  max_retries=max_retries,
320
344
  initial_retry_delay=initial_retry_delay,
321
345
  max_retry_delay=max_retry_delay,
346
+ retry_policy=retry_policy,
322
347
  )
323
348
 
324
- async def _retry_with_backoff(
325
- self,
326
- func: Any,
327
- *args: Any,
328
- _retry_history: Optional[List] = None,
329
- **kwargs: Any,
330
- ) -> Any:
331
- """Execute an async function with exponential backoff on transient failures."""
332
- current_delay = self.initial_retry_delay
333
-
334
- for attempt in range(self.max_retries + 1):
335
- try:
336
- return await func(*args, **kwargs)
337
- except (RateLimitError, ModelClientError) as exc:
338
- if attempt >= self.max_retries:
339
- logger.warning(
340
- f"Max retries ({self.max_retries}) reached for {func.__name__}"
341
- )
342
- raise
343
- if _retry_history is not None:
344
- _retry_history.append(
345
- build_retry_record(attempt + 1, current_delay, type(exc), "retrying")
346
- )
347
- logger.debug(
348
- f"Transient error in {func.__name__} "
349
- f"(attempt {attempt + 1}/{self.max_retries + 1}): {exc}. "
350
- f"Retrying in {current_delay:.1f}s"
351
- )
352
- await asyncio.sleep(current_delay)
353
- current_delay = min(current_delay * 2, self.max_retry_delay)
354
- except (AuthenticationError, InvalidRequestError):
355
- raise
356
-
357
- raise ModelClientError("Retry logic error")
358
-
359
349
  async def create(self, input_text: str, **kwargs: Any) -> EmbeddingResult:
360
350
  """Create one embedding result from a single text input."""
361
351
  return await self.create_batch([input_text], **kwargs)
@@ -474,9 +464,7 @@ class AzureOpenAIEmbeddingClient(
474
464
  return AzureOpenAIEmbeddingClientConfig(
475
465
  model=self.model,
476
466
  config=self.config.copy(),
477
- max_retries=self.max_retries,
478
- initial_retry_delay=self.initial_retry_delay,
479
- max_retry_delay=self.max_retry_delay,
467
+ retry_policy=self.retry_policy,
480
468
  key_env_var=getattr(self, "_key_env_var", "AZURE_OPENAI_API_KEY"),
481
469
  deployment_env_var=getattr(
482
470
  self, "_deployment_env_var", "AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME"
@@ -502,9 +490,7 @@ class AzureOpenAIEmbeddingClient(
502
490
  model=config.model,
503
491
  api_key=resolved_key,
504
492
  config=config.config or None,
505
- max_retries=config.max_retries,
506
- initial_retry_delay=config.initial_retry_delay,
507
- max_retry_delay=config.max_retry_delay,
493
+ retry_policy=config.retry_policy,
508
494
  )
509
495
  instance._key_env_var = config.key_env_var
510
496
  instance._deployment_env_var = config.deployment_env_var
@@ -50,10 +50,12 @@ class BaseChatCompletionClientConfig(BaseModel):
50
50
 
51
51
  Example:
52
52
  ```python
53
+ from agentbyte.llm import RetryPolicy
54
+
53
55
  class OpenAIChatCompletionClientConfig(BaseChatCompletionClientConfig):
54
56
  model: str
55
57
  config: Dict[str, Any] = {}
56
- max_retries: int = 3
58
+ retry_policy: RetryPolicy = RetryPolicy()
57
59
 
58
60
  # Serialize: client → config → JSON
59
61
  config = client._to_config()
@@ -428,7 +430,7 @@ class BaseChatCompletionClient(ABC, ComponentLoader):
428
430
  config={"temperature": 0.7}
429
431
  )
430
432
  config = client._to_config()
431
- # config now has: model, config, max_retries, etc.
433
+ # config now has: model, config, retry_policy (nested RetryPolicy), etc.
432
434
  ```
433
435
  """
434
436
  pass