melara 0.1.0__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.

Potentially problematic release.


This version of melara might be problematic. Click here for more details.

Files changed (453) hide show
  1. melara-0.1.0/LICENSE +201 -0
  2. melara-0.1.0/NOTICE +1 -0
  3. melara-0.1.0/PKG-INFO +106 -0
  4. melara-0.1.0/README-PYPI.md +89 -0
  5. melara-0.1.0/README.md +89 -0
  6. melara-0.1.0/pyproject.toml +56 -0
  7. melara-0.1.0/setup.cfg +4 -0
  8. melara-0.1.0/src/melara/__init__.py +18 -0
  9. melara-0.1.0/src/melara/_hooks/__init__.py +6 -0
  10. melara-0.1.0/src/melara/_hooks/registration.py +14 -0
  11. melara-0.1.0/src/melara/_hooks/sdkhooks.py +77 -0
  12. melara-0.1.0/src/melara/_hooks/types.py +125 -0
  13. melara-0.1.0/src/melara/_version.py +16 -0
  14. melara-0.1.0/src/melara/basesdk.py +408 -0
  15. melara-0.1.0/src/melara/beta.py +24 -0
  16. melara-0.1.0/src/melara/beta_responses.py +4 -0
  17. melara-0.1.0/src/melara/chat.py +1915 -0
  18. melara-0.1.0/src/melara/components/__init__.py +4937 -0
  19. melara-0.1.0/src/melara/components/additionaltoolsitem.py +284 -0
  20. melara-0.1.0/src/melara/components/agentmessageitem.py +217 -0
  21. melara-0.1.0/src/melara/components/alignment.py +22 -0
  22. melara-0.1.0/src/melara/components/alignmentallowedcallrecord.py +29 -0
  23. melara-0.1.0/src/melara/components/alignmentblockedcallrecord.py +29 -0
  24. melara-0.1.0/src/melara/components/alignmentcallrecord.py +69 -0
  25. melara-0.1.0/src/melara/components/alignmentchataudio.py +43 -0
  26. melara-0.1.0/src/melara/components/alignmentchatimage.py +29 -0
  27. melara-0.1.0/src/melara/components/alignmentchatrejected.py +68 -0
  28. melara-0.1.0/src/melara/components/alignmentchattoolcall.py +35 -0
  29. melara-0.1.0/src/melara/components/alignmentplugin.py +74 -0
  30. melara-0.1.0/src/melara/components/alignmentrejected.py +22 -0
  31. melara-0.1.0/src/melara/components/alignmentresponsesrejected.py +105 -0
  32. melara-0.1.0/src/melara/components/alignmentrulerecord.py +21 -0
  33. melara-0.1.0/src/melara/components/alignmentunavailablecallrecord.py +37 -0
  34. melara-0.1.0/src/melara/components/annotationaddedevent.py +44 -0
  35. melara-0.1.0/src/melara/components/anthropicadvisormessageusageiteration.py +80 -0
  36. melara-0.1.0/src/melara/components/anthropiccachecontroldirective.py +43 -0
  37. melara-0.1.0/src/melara/components/anthropiccachecontrolttl.py +15 -0
  38. melara-0.1.0/src/melara/components/anthropiccachecreation.py +17 -0
  39. melara-0.1.0/src/melara/components/anthropiccompactionusageiteration.py +77 -0
  40. melara-0.1.0/src/melara/components/anthropiciterationcachecreation.py +37 -0
  41. melara-0.1.0/src/melara/components/anthropicmessageusageiteration.py +81 -0
  42. melara-0.1.0/src/melara/components/anthropicspeed.py +15 -0
  43. melara-0.1.0/src/melara/components/anthropicunknownusageiteration.py +74 -0
  44. melara-0.1.0/src/melara/components/anthropicusageiteration.py +44 -0
  45. melara-0.1.0/src/melara/components/apierrortype.py +41 -0
  46. melara-0.1.0/src/melara/components/applypatchcallitem.py +75 -0
  47. melara-0.1.0/src/melara/components/applypatchcalloperation.py +71 -0
  48. melara-0.1.0/src/melara/components/applypatchcalloperationdiffdeltaevent.py +36 -0
  49. melara-0.1.0/src/melara/components/applypatchcalloperationdiffdoneevent.py +36 -0
  50. melara-0.1.0/src/melara/components/applypatchcalloutputitem.py +76 -0
  51. melara-0.1.0/src/melara/components/applypatchcallstatus.py +16 -0
  52. melara-0.1.0/src/melara/components/applypatchcreatefileoperation.py +28 -0
  53. melara-0.1.0/src/melara/components/applypatchdeletefileoperation.py +25 -0
  54. melara-0.1.0/src/melara/components/applypatchservertool.py +22 -0
  55. melara-0.1.0/src/melara/components/applypatchupdatefileoperation.py +28 -0
  56. melara-0.1.0/src/melara/components/autobetarouterplugin.py +87 -0
  57. melara-0.1.0/src/melara/components/autorouterplugin.py +93 -0
  58. melara-0.1.0/src/melara/components/badgatewayresponseerrordata.py +57 -0
  59. melara-0.1.0/src/melara/components/badrequestresponseerrordata.py +57 -0
  60. melara-0.1.0/src/melara/components/baseinputs_union.py +245 -0
  61. melara-0.1.0/src/melara/components/basereasoningconfig.py +63 -0
  62. melara-0.1.0/src/melara/components/chatassistantimages.py +24 -0
  63. melara-0.1.0/src/melara/components/chatassistantmessage.py +128 -0
  64. melara-0.1.0/src/melara/components/chataudiooutput.py +53 -0
  65. melara-0.1.0/src/melara/components/chatchoice.py +68 -0
  66. melara-0.1.0/src/melara/components/chatcontentaudio.py +47 -0
  67. melara-0.1.0/src/melara/components/chatcontentcachecontrol.py +43 -0
  68. melara-0.1.0/src/melara/components/chatcontentfile.py +62 -0
  69. melara-0.1.0/src/melara/components/chatcontentimage.py +69 -0
  70. melara-0.1.0/src/melara/components/chatcontentitems.py +77 -0
  71. melara-0.1.0/src/melara/components/chatcontenttext.py +72 -0
  72. melara-0.1.0/src/melara/components/chatcontentvideo.py +28 -0
  73. melara-0.1.0/src/melara/components/chatcontentvideoinput.py +53 -0
  74. melara-0.1.0/src/melara/components/chatdebugoptions.py +38 -0
  75. melara-0.1.0/src/melara/components/chatdevelopermessage.py +104 -0
  76. melara-0.1.0/src/melara/components/chatdynamicservertool.py +39 -0
  77. melara-0.1.0/src/melara/components/chatfinishreasonenum.py +18 -0
  78. melara-0.1.0/src/melara/components/chatformatgrammarconfig.py +27 -0
  79. melara-0.1.0/src/melara/components/chatformatjsonobjectconfig.py +22 -0
  80. melara-0.1.0/src/melara/components/chatformatjsonschemaconfig.py +28 -0
  81. melara-0.1.0/src/melara/components/chatformatpythonconfig.py +22 -0
  82. melara-0.1.0/src/melara/components/chatformattextconfig.py +22 -0
  83. melara-0.1.0/src/melara/components/chatfunctiontool.py +152 -0
  84. melara-0.1.0/src/melara/components/chatjsonschemaconfig.py +75 -0
  85. melara-0.1.0/src/melara/components/chatmessages.py +39 -0
  86. melara-0.1.0/src/melara/components/chatnamedtoolchoice.py +35 -0
  87. melara-0.1.0/src/melara/components/chatreasoningsummaryverbosityenum.py +16 -0
  88. melara-0.1.0/src/melara/components/chatrequest.py +551 -0
  89. melara-0.1.0/src/melara/components/chatresult.py +92 -0
  90. melara-0.1.0/src/melara/components/chatservertoolchoice.py +20 -0
  91. melara-0.1.0/src/melara/components/chatstreamchoice.py +68 -0
  92. melara-0.1.0/src/melara/components/chatstreamchunk.py +181 -0
  93. melara-0.1.0/src/melara/components/chatstreamdelta.py +98 -0
  94. melara-0.1.0/src/melara/components/chatstreamingresponse.py +17 -0
  95. melara-0.1.0/src/melara/components/chatstreamoptions.py +38 -0
  96. melara-0.1.0/src/melara/components/chatstreamtoolcall.py +92 -0
  97. melara-0.1.0/src/melara/components/chatsystemmessage.py +102 -0
  98. melara-0.1.0/src/melara/components/chattokenlogprob.py +90 -0
  99. melara-0.1.0/src/melara/components/chattokenlogprobs.py +59 -0
  100. melara-0.1.0/src/melara/components/chattoolcall.py +45 -0
  101. melara-0.1.0/src/melara/components/chattoolchoice.py +43 -0
  102. melara-0.1.0/src/melara/components/chattoolmessage.py +45 -0
  103. melara-0.1.0/src/melara/components/chatusage.py +231 -0
  104. melara-0.1.0/src/melara/components/chatusermessage.py +62 -0
  105. melara-0.1.0/src/melara/components/chatwebsearchshorthand.py +129 -0
  106. melara-0.1.0/src/melara/components/codeinterpretercallcodedeltaevent.py +36 -0
  107. melara-0.1.0/src/melara/components/codeinterpretercallcodedoneevent.py +36 -0
  108. melara-0.1.0/src/melara/components/codeinterpretercallcompletedevent.py +33 -0
  109. melara-0.1.0/src/melara/components/codeinterpretercallinprogressevent.py +33 -0
  110. melara-0.1.0/src/melara/components/codeinterpretercallinterpretingevent.py +33 -0
  111. melara-0.1.0/src/melara/components/codeinterpreterfileoutput.py +97 -0
  112. melara-0.1.0/src/melara/components/codeinterpreterimageoutput.py +21 -0
  113. melara-0.1.0/src/melara/components/codeinterpreterlogsoutput.py +21 -0
  114. melara-0.1.0/src/melara/components/codeinterpreterservertool.py +94 -0
  115. melara-0.1.0/src/melara/components/codexlocalshelltool.py +22 -0
  116. melara-0.1.0/src/melara/components/compactionitem.py +77 -0
  117. melara-0.1.0/src/melara/components/compoundfilter.py +31 -0
  118. melara-0.1.0/src/melara/components/computeruseservertool.py +43 -0
  119. melara-0.1.0/src/melara/components/configurationupdateitem.py +66 -0
  120. melara-0.1.0/src/melara/components/configurationupdatereasoning.py +36 -0
  121. melara-0.1.0/src/melara/components/contentpartaddedevent.py +93 -0
  122. melara-0.1.0/src/melara/components/contentpartdoneevent.py +93 -0
  123. melara-0.1.0/src/melara/components/contentpartimage.py +29 -0
  124. melara-0.1.0/src/melara/components/contentpartinputaudio.py +22 -0
  125. melara-0.1.0/src/melara/components/contentpartinputfile.py +22 -0
  126. melara-0.1.0/src/melara/components/contentpartinputvideo.py +22 -0
  127. melara-0.1.0/src/melara/components/contextcompactionitem.py +77 -0
  128. melara-0.1.0/src/melara/components/contextcompressionengine.py +9 -0
  129. melara-0.1.0/src/melara/components/contextcompressionplugin.py +46 -0
  130. melara-0.1.0/src/melara/components/costdetails.py +61 -0
  131. melara-0.1.0/src/melara/components/customtool.py +138 -0
  132. melara-0.1.0/src/melara/components/customtoolcallinputdeltaevent.py +34 -0
  133. melara-0.1.0/src/melara/components/customtoolcallinputdoneevent.py +34 -0
  134. melara-0.1.0/src/melara/components/customtoolcallitem.py +87 -0
  135. melara-0.1.0/src/melara/components/customtoolcalloutputitem.py +150 -0
  136. melara-0.1.0/src/melara/components/debugevent.py +81 -0
  137. melara-0.1.0/src/melara/components/deferredbm25search.py +42 -0
  138. melara-0.1.0/src/melara/components/deferredcustomsearch.py +48 -0
  139. melara-0.1.0/src/melara/components/deferredregexsearch.py +42 -0
  140. melara-0.1.0/src/melara/components/deferredtoolscontrol.py +49 -0
  141. melara-0.1.0/src/melara/components/deferredtoolssearchstrategy.py +33 -0
  142. melara-0.1.0/src/melara/components/easyinputmessage.py +216 -0
  143. melara-0.1.0/src/melara/components/edgenetworktimeoutresponseerrordata.py +57 -0
  144. melara-0.1.0/src/melara/components/errorevent.py +49 -0
  145. melara-0.1.0/src/melara/components/failabletoolcallstatus.py +17 -0
  146. melara-0.1.0/src/melara/components/filecitation.py +27 -0
  147. melara-0.1.0/src/melara/components/fileparserplugin.py +46 -0
  148. melara-0.1.0/src/melara/components/filepath.py +24 -0
  149. melara-0.1.0/src/melara/components/filesearchservertool.py +161 -0
  150. melara-0.1.0/src/melara/components/forbiddenresponseerrordata.py +57 -0
  151. melara-0.1.0/src/melara/components/formatjsonobjectconfig.py +22 -0
  152. melara-0.1.0/src/melara/components/formatjsonschemaconfig.py +73 -0
  153. melara-0.1.0/src/melara/components/formats.py +65 -0
  154. melara-0.1.0/src/melara/components/formattextconfig.py +22 -0
  155. melara-0.1.0/src/melara/components/functioncallargsdeltaevent.py +34 -0
  156. melara-0.1.0/src/melara/components/functioncallargsdoneevent.py +37 -0
  157. melara-0.1.0/src/melara/components/functioncallitem.py +122 -0
  158. melara-0.1.0/src/melara/components/functioncalloutputitem.py +163 -0
  159. melara-0.1.0/src/melara/components/fusionanalysisresult.py +75 -0
  160. melara-0.1.0/src/melara/components/fusioncallanalysiscompletedevent.py +39 -0
  161. melara-0.1.0/src/melara/components/fusioncallanalysisinprogressevent.py +49 -0
  162. melara-0.1.0/src/melara/components/fusioncallcompletedevent.py +31 -0
  163. melara-0.1.0/src/melara/components/fusioncallinprogressevent.py +31 -0
  164. melara-0.1.0/src/melara/components/fusioncallpaneladdedevent.py +34 -0
  165. melara-0.1.0/src/melara/components/fusioncallpanelcompletedevent.py +37 -0
  166. melara-0.1.0/src/melara/components/fusioncallpaneldeltaevent.py +37 -0
  167. melara-0.1.0/src/melara/components/fusioncallpanelfailedevent.py +57 -0
  168. melara-0.1.0/src/melara/components/fusioncallpanelreasoningdeltaevent.py +39 -0
  169. melara-0.1.0/src/melara/components/fusionplugin.py +141 -0
  170. melara-0.1.0/src/melara/components/gatewaytimeoutresponseerrordata.py +57 -0
  171. melara-0.1.0/src/melara/components/imageconfig.py +14 -0
  172. melara-0.1.0/src/melara/components/imagegencallcompletedevent.py +31 -0
  173. melara-0.1.0/src/melara/components/imagegencallgeneratingevent.py +31 -0
  174. melara-0.1.0/src/melara/components/imagegencallinprogressevent.py +31 -0
  175. melara-0.1.0/src/melara/components/imagegencallpartialimageevent.py +39 -0
  176. melara-0.1.0/src/melara/components/imagegencompletedevent.py +63 -0
  177. melara-0.1.0/src/melara/components/imagegenerationproviderpreferences.py +761 -0
  178. melara-0.1.0/src/melara/components/imagegenerationrequest.py +227 -0
  179. melara-0.1.0/src/melara/components/imagegenerationresponse.py +84 -0
  180. melara-0.1.0/src/melara/components/imagegenerationservertool.py +174 -0
  181. melara-0.1.0/src/melara/components/imagegenerationstatus.py +17 -0
  182. melara-0.1.0/src/melara/components/imagegenerationusage.py +321 -0
  183. melara-0.1.0/src/melara/components/imagegenpartialimageevent.py +35 -0
  184. melara-0.1.0/src/melara/components/imagegenstreamerrorevent.py +91 -0
  185. melara-0.1.0/src/melara/components/imagegentextchunkevent.py +46 -0
  186. melara-0.1.0/src/melara/components/imagestreamingresponse.py +84 -0
  187. melara-0.1.0/src/melara/components/incompletedetails.py +41 -0
  188. melara-0.1.0/src/melara/components/inputaudio.py +52 -0
  189. melara-0.1.0/src/melara/components/inputfile.py +66 -0
  190. melara-0.1.0/src/melara/components/inputimage.py +75 -0
  191. melara-0.1.0/src/melara/components/inputmessageitem.py +178 -0
  192. melara-0.1.0/src/melara/components/inputs_union.py +402 -0
  193. melara-0.1.0/src/melara/components/inputtext.py +63 -0
  194. melara-0.1.0/src/melara/components/inputvideo.py +59 -0
  195. melara-0.1.0/src/melara/components/internalserverresponseerrordata.py +57 -0
  196. melara-0.1.0/src/melara/components/itemreferenceitem.py +25 -0
  197. melara-0.1.0/src/melara/components/jevrouterplugin.py +57 -0
  198. melara-0.1.0/src/melara/components/legacy_chatcontentvideo.py +38 -0
  199. melara-0.1.0/src/melara/components/legacy_chatcontentvideoinput.py +53 -0
  200. melara-0.1.0/src/melara/components/legacy_websearchservertool.py +109 -0
  201. melara-0.1.0/src/melara/components/localshellcallitem.py +93 -0
  202. melara-0.1.0/src/melara/components/localshellcalloutputitem.py +64 -0
  203. melara-0.1.0/src/melara/components/mcpapprovalrequestitem.py +34 -0
  204. melara-0.1.0/src/melara/components/mcpapprovalresponseitem.py +66 -0
  205. melara-0.1.0/src/melara/components/mcpcallitem.py +75 -0
  206. melara-0.1.0/src/melara/components/mcphttperror.py +28 -0
  207. melara-0.1.0/src/melara/components/mcplisttoolsitem.py +108 -0
  208. melara-0.1.0/src/melara/components/mcpprotocolerror.py +28 -0
  209. melara-0.1.0/src/melara/components/mcpservertool.py +232 -0
  210. melara-0.1.0/src/melara/components/mcptoolcallerror.py +28 -0
  211. melara-0.1.0/src/melara/components/mcptoolexecutionerror.py +42 -0
  212. melara-0.1.0/src/melara/components/model.py +27 -0
  213. melara-0.1.0/src/melara/components/modelslistresponse.py +16 -0
  214. melara-0.1.0/src/melara/components/moderationplugin.py +18 -0
  215. melara-0.1.0/src/melara/components/multimodalmedia.py +42 -0
  216. melara-0.1.0/src/melara/components/namespacefunctiontool.py +109 -0
  217. melara-0.1.0/src/melara/components/namespacetool.py +73 -0
  218. melara-0.1.0/src/melara/components/notfoundresponseerrordata.py +57 -0
  219. melara-0.1.0/src/melara/components/openairesponsecustomtoolcall.py +64 -0
  220. melara-0.1.0/src/melara/components/openairesponsecustomtoolcalloutput.py +104 -0
  221. melara-0.1.0/src/melara/components/openairesponsefunctiontoolcall.py +103 -0
  222. melara-0.1.0/src/melara/components/openairesponsefunctiontoolcalloutput.py +123 -0
  223. melara-0.1.0/src/melara/components/openairesponseinputmessageitem.py +126 -0
  224. melara-0.1.0/src/melara/components/openairesponsesannotation.py +51 -0
  225. melara-0.1.0/src/melara/components/openairesponsesrefusalcontent.py +21 -0
  226. melara-0.1.0/src/melara/components/openairesponsesresponsestatus.py +19 -0
  227. melara-0.1.0/src/melara/components/openairesponsestoolchoice_union.py +117 -0
  228. melara-0.1.0/src/melara/components/openairesponsestruncation.py +15 -0
  229. melara-0.1.0/src/melara/components/openresponsescreatedevent.py +31 -0
  230. melara-0.1.0/src/melara/components/openresponseserrorfield.py +77 -0
  231. melara-0.1.0/src/melara/components/openresponseserrormetadata.py +73 -0
  232. melara-0.1.0/src/melara/components/openresponsesinprogressevent.py +31 -0
  233. melara-0.1.0/src/melara/components/openresponsesresult.py +608 -0
  234. melara-0.1.0/src/melara/components/outputapplypatchcallitem.py +43 -0
  235. melara-0.1.0/src/melara/components/outputcodeinterpretercallitem.py +160 -0
  236. melara-0.1.0/src/melara/components/outputcomputercallitem.py +74 -0
  237. melara-0.1.0/src/melara/components/outputcustomtoolcallitem.py +81 -0
  238. melara-0.1.0/src/melara/components/outputfilesearchcallitem.py +28 -0
  239. melara-0.1.0/src/melara/components/outputfunctioncallitem.py +129 -0
  240. melara-0.1.0/src/melara/components/outputimagegenerationcallitem.py +63 -0
  241. melara-0.1.0/src/melara/components/outputitemapplypatchcall.py +120 -0
  242. melara-0.1.0/src/melara/components/outputitemcodeinterpretercall.py +156 -0
  243. melara-0.1.0/src/melara/components/outputitemcustomtoolcall.py +77 -0
  244. melara-0.1.0/src/melara/components/outputitemfilesearchcall.py +28 -0
  245. melara-0.1.0/src/melara/components/outputitemfunctioncall.py +96 -0
  246. melara-0.1.0/src/melara/components/outputitemimagegenerationcall.py +58 -0
  247. melara-0.1.0/src/melara/components/outputitemreasoning.py +96 -0
  248. melara-0.1.0/src/melara/components/outputitems.py +139 -0
  249. melara-0.1.0/src/melara/components/outputitemwebsearchcall.py +210 -0
  250. melara-0.1.0/src/melara/components/outputmessage.py +165 -0
  251. melara-0.1.0/src/melara/components/outputmessageitem.py +171 -0
  252. melara-0.1.0/src/melara/components/outputmodalityenum.py +15 -0
  253. melara-0.1.0/src/melara/components/outputreasoningitem.py +120 -0
  254. melara-0.1.0/src/melara/components/outputshellcallitem.py +102 -0
  255. melara-0.1.0/src/melara/components/outputshellcalloutputitem.py +117 -0
  256. melara-0.1.0/src/melara/components/outputtoolsearchcallitem.py +58 -0
  257. melara-0.1.0/src/melara/components/outputwebsearchcallitem.py +210 -0
  258. melara-0.1.0/src/melara/components/outputwebsearchservertoolitem.py +107 -0
  259. melara-0.1.0/src/melara/components/paretorouterplugin.py +67 -0
  260. melara-0.1.0/src/melara/components/payloadtoolargeresponseerrordata.py +57 -0
  261. melara-0.1.0/src/melara/components/paymentrequiredresponseerrordata.py +57 -0
  262. melara-0.1.0/src/melara/components/pdfparserengine.py +32 -0
  263. melara-0.1.0/src/melara/components/pdfparseroptions.py +39 -0
  264. melara-0.1.0/src/melara/components/percentilelatencycutoffs.py +67 -0
  265. melara-0.1.0/src/melara/components/percentilethroughputcutoffs.py +67 -0
  266. melara-0.1.0/src/melara/components/prediction.py +36 -0
  267. melara-0.1.0/src/melara/components/predictioncontenttext.py +25 -0
  268. melara-0.1.0/src/melara/components/preferredmaxlatency.py +22 -0
  269. melara-0.1.0/src/melara/components/preferredminthroughput.py +23 -0
  270. melara-0.1.0/src/melara/components/preview_20250311_websearchservertool.py +110 -0
  271. melara-0.1.0/src/melara/components/preview_websearchservertool.py +110 -0
  272. melara-0.1.0/src/melara/components/preview_websearchuserlocation.py +62 -0
  273. melara-0.1.0/src/melara/components/promptcachebreakpoint.py +22 -0
  274. melara-0.1.0/src/melara/components/promptcacheoptions.py +57 -0
  275. melara-0.1.0/src/melara/components/providername.py +12 -0
  276. melara-0.1.0/src/melara/components/provideroptions.py +635 -0
  277. melara-0.1.0/src/melara/components/provideroverloadedresponseerrordata.py +57 -0
  278. melara-0.1.0/src/melara/components/providerpreferences.py +283 -0
  279. melara-0.1.0/src/melara/components/providersort.py +18 -0
  280. melara-0.1.0/src/melara/components/providersortconfig.py +81 -0
  281. melara-0.1.0/src/melara/components/quantization.py +25 -0
  282. melara-0.1.0/src/melara/components/reasoningcontext.py +17 -0
  283. melara-0.1.0/src/melara/components/reasoningdeltaevent.py +37 -0
  284. melara-0.1.0/src/melara/components/reasoningdetailencrypted.py +76 -0
  285. melara-0.1.0/src/melara/components/reasoningdetailservertoolcall.py +85 -0
  286. melara-0.1.0/src/melara/components/reasoningdetailsummary.py +76 -0
  287. melara-0.1.0/src/melara/components/reasoningdetailtext.py +79 -0
  288. melara-0.1.0/src/melara/components/reasoningdetailunion.py +75 -0
  289. melara-0.1.0/src/melara/components/reasoningdoneevent.py +37 -0
  290. melara-0.1.0/src/melara/components/reasoningeffort.py +20 -0
  291. melara-0.1.0/src/melara/components/reasoningformat.py +19 -0
  292. melara-0.1.0/src/melara/components/reasoningitem.py +118 -0
  293. melara-0.1.0/src/melara/components/reasoningmode.py +16 -0
  294. melara-0.1.0/src/melara/components/reasoningsummarypartaddedevent.py +38 -0
  295. melara-0.1.0/src/melara/components/reasoningsummarypartdoneevent.py +38 -0
  296. melara-0.1.0/src/melara/components/reasoningsummarytext.py +21 -0
  297. melara-0.1.0/src/melara/components/reasoningsummarytextdeltaevent.py +37 -0
  298. melara-0.1.0/src/melara/components/reasoningsummarytextdoneevent.py +37 -0
  299. melara-0.1.0/src/melara/components/reasoningsummaryverbosity.py +16 -0
  300. melara-0.1.0/src/melara/components/reasoningtextcontent.py +21 -0
  301. melara-0.1.0/src/melara/components/refusaldeltaevent.py +37 -0
  302. melara-0.1.0/src/melara/components/refusaldoneevent.py +37 -0
  303. melara-0.1.0/src/melara/components/requesttimeoutresponseerrordata.py +57 -0
  304. melara-0.1.0/src/melara/components/responsehealingplugin.py +40 -0
  305. melara-0.1.0/src/melara/components/responseincludesenum.py +18 -0
  306. melara-0.1.0/src/melara/components/responseoutputtext.py +90 -0
  307. melara-0.1.0/src/melara/components/responsesrequest.py +624 -0
  308. melara-0.1.0/src/melara/components/responsesstreamingresponse.py +17 -0
  309. melara-0.1.0/src/melara/components/searchcontextsizeenum.py +17 -0
  310. melara-0.1.0/src/melara/components/searchqualitylevel.py +17 -0
  311. melara-0.1.0/src/melara/components/security.py +43 -0
  312. melara-0.1.0/src/melara/components/servertoolusedetails.py +66 -0
  313. melara-0.1.0/src/melara/components/serviceunavailableresponseerrordata.py +57 -0
  314. melara-0.1.0/src/melara/components/shellcallitem.py +114 -0
  315. melara-0.1.0/src/melara/components/shellcalloutputcontent.py +129 -0
  316. melara-0.1.0/src/melara/components/shellcalloutputitem.py +117 -0
  317. melara-0.1.0/src/melara/components/shellcallstatus.py +17 -0
  318. melara-0.1.0/src/melara/components/shellservertool.py +22 -0
  319. melara-0.1.0/src/melara/components/speechinput.py +17 -0
  320. melara-0.1.0/src/melara/components/speechinputreference.py +42 -0
  321. melara-0.1.0/src/melara/components/speechinputreferenceaudio.py +31 -0
  322. melara-0.1.0/src/melara/components/speechinputreferenceaudioinput.py +55 -0
  323. melara-0.1.0/src/melara/components/speechinputreferenceimage.py +31 -0
  324. melara-0.1.0/src/melara/components/speechinputreferenceimageinput.py +20 -0
  325. melara-0.1.0/src/melara/components/speechinputreferencetext.py +27 -0
  326. melara-0.1.0/src/melara/components/speechrequest.py +192 -0
  327. melara-0.1.0/src/melara/components/speechturn.py +44 -0
  328. melara-0.1.0/src/melara/components/stopservertoolswhencondition.py +54 -0
  329. melara-0.1.0/src/melara/components/stopservertoolswhenfinishreasonis.py +25 -0
  330. melara-0.1.0/src/melara/components/stopservertoolswhenhastoolcall.py +25 -0
  331. melara-0.1.0/src/melara/components/stopservertoolswhenmaxcost.py +25 -0
  332. melara-0.1.0/src/melara/components/stopservertoolswhenmaxtokensused.py +25 -0
  333. melara-0.1.0/src/melara/components/stopservertoolswhenstepcountis.py +25 -0
  334. melara-0.1.0/src/melara/components/storedprompttemplate.py +62 -0
  335. melara-0.1.0/src/melara/components/streamevents.py +360 -0
  336. melara-0.1.0/src/melara/components/streameventsresponsecompleted.py +31 -0
  337. melara-0.1.0/src/melara/components/streameventsresponsefailed.py +31 -0
  338. melara-0.1.0/src/melara/components/streameventsresponseincomplete.py +31 -0
  339. melara-0.1.0/src/melara/components/streameventsresponseoutputitemadded.py +34 -0
  340. melara-0.1.0/src/melara/components/streameventsresponseoutputitemdone.py +34 -0
  341. melara-0.1.0/src/melara/components/streamlogprob.py +56 -0
  342. melara-0.1.0/src/melara/components/streamlogprobtoplogprob.py +49 -0
  343. melara-0.1.0/src/melara/components/sttentity.py +35 -0
  344. melara-0.1.0/src/melara/components/sttresponse.py +99 -0
  345. melara-0.1.0/src/melara/components/sttsegment.py +110 -0
  346. melara-0.1.0/src/melara/components/sttusage.py +60 -0
  347. melara-0.1.0/src/melara/components/sttword.py +85 -0
  348. melara-0.1.0/src/melara/components/switchyardrouterplugin.py +59 -0
  349. melara-0.1.0/src/melara/components/textdeltaevent.py +41 -0
  350. melara-0.1.0/src/melara/components/textdoneevent.py +41 -0
  351. melara-0.1.0/src/melara/components/textextendedconfig.py +77 -0
  352. melara-0.1.0/src/melara/components/toolcallstatus.py +16 -0
  353. melara-0.1.0/src/melara/components/toolchoiceallowed.py +40 -0
  354. melara-0.1.0/src/melara/components/toolsearchcallitem.py +89 -0
  355. melara-0.1.0/src/melara/components/toolsearchoutputitem.py +294 -0
  356. melara-0.1.0/src/melara/components/toomanyrequestsresponseerrordata.py +57 -0
  357. melara-0.1.0/src/melara/components/traceconfig.py +67 -0
  358. melara-0.1.0/src/melara/components/truncation.py +15 -0
  359. melara-0.1.0/src/melara/components/unauthorizedresponseerrordata.py +57 -0
  360. melara-0.1.0/src/melara/components/unprocessableentityresponseerrordata.py +57 -0
  361. melara-0.1.0/src/melara/components/urlcitation.py +50 -0
  362. melara-0.1.0/src/melara/components/webfetchplugin.py +57 -0
  363. melara-0.1.0/src/melara/components/websearchcallcompletedevent.py +31 -0
  364. melara-0.1.0/src/melara/components/websearchcallinprogressevent.py +31 -0
  365. melara-0.1.0/src/melara/components/websearchcallsearchingevent.py +31 -0
  366. melara-0.1.0/src/melara/components/websearchconfig.py +106 -0
  367. melara-0.1.0/src/melara/components/websearchdomainfilter.py +57 -0
  368. melara-0.1.0/src/melara/components/websearchengine.py +19 -0
  369. melara-0.1.0/src/melara/components/websearchengineenum.py +20 -0
  370. melara-0.1.0/src/melara/components/websearchmode.py +23 -0
  371. melara-0.1.0/src/melara/components/websearchplugin.py +162 -0
  372. melara-0.1.0/src/melara/components/websearchservertool.py +109 -0
  373. melara-0.1.0/src/melara/components/websearchsource.py +21 -0
  374. melara-0.1.0/src/melara/components/websearchstatus.py +17 -0
  375. melara-0.1.0/src/melara/components/websearchuserlocation.py +66 -0
  376. melara-0.1.0/src/melara/components/websearchuserlocationservertool.py +66 -0
  377. melara-0.1.0/src/melara/components/xsearchoptions.py +73 -0
  378. melara-0.1.0/src/melara/embeddings.py +479 -0
  379. melara-0.1.0/src/melara/endpoints.json +3 -0
  380. melara-0.1.0/src/melara/errors/__init__.py +151 -0
  381. melara-0.1.0/src/melara/errors/badgatewayresponse_error.py +36 -0
  382. melara-0.1.0/src/melara/errors/badrequestresponse_error.py +36 -0
  383. melara-0.1.0/src/melara/errors/edgenetworktimeoutresponse_error.py +36 -0
  384. melara-0.1.0/src/melara/errors/forbiddenresponse_error.py +36 -0
  385. melara-0.1.0/src/melara/errors/gatewaytimeoutresponse_error.py +36 -0
  386. melara-0.1.0/src/melara/errors/internalserverresponse_error.py +36 -0
  387. melara-0.1.0/src/melara/errors/melaradefaulterror.py +17 -0
  388. melara-0.1.0/src/melara/errors/melaraerror.py +31 -0
  389. melara-0.1.0/src/melara/errors/no_response_error.py +19 -0
  390. melara-0.1.0/src/melara/errors/notfoundresponse_error.py +36 -0
  391. melara-0.1.0/src/melara/errors/payloadtoolargeresponse_error.py +36 -0
  392. melara-0.1.0/src/melara/errors/paymentrequiredresponse_error.py +36 -0
  393. melara-0.1.0/src/melara/errors/provideroverloadedresponse_error.py +36 -0
  394. melara-0.1.0/src/melara/errors/requesttimeoutresponse_error.py +36 -0
  395. melara-0.1.0/src/melara/errors/responsevalidationerror.py +28 -0
  396. melara-0.1.0/src/melara/errors/serviceunavailableresponse_error.py +36 -0
  397. melara-0.1.0/src/melara/errors/toomanyrequestsresponse_error.py +36 -0
  398. melara-0.1.0/src/melara/errors/unauthorizedresponse_error.py +36 -0
  399. melara-0.1.0/src/melara/errors/unprocessableentityresponse_error.py +36 -0
  400. melara-0.1.0/src/melara/httpclient.py +126 -0
  401. melara-0.1.0/src/melara/images.py +1017 -0
  402. melara-0.1.0/src/melara/locales/__init__.py +1 -0
  403. melara-0.1.0/src/melara/locales/en.py +54 -0
  404. melara-0.1.0/src/melara/models/__init__.py +24 -0
  405. melara-0.1.0/src/melara/models/internal/__init__.py +26 -0
  406. melara-0.1.0/src/melara/models/internal/globals.py +60 -0
  407. melara-0.1.0/src/melara/models_.py +393 -0
  408. melara-0.1.0/src/melara/operations/__init__.py +272 -0
  409. melara-0.1.0/src/melara/operations/createaudiospeech.py +117 -0
  410. melara-0.1.0/src/melara/operations/createaudiotranscriptions_multipart.py +289 -0
  411. melara-0.1.0/src/melara/operations/createembeddings.py +559 -0
  412. melara-0.1.0/src/melara/operations/createimages.py +160 -0
  413. melara-0.1.0/src/melara/operations/createresponses.py +154 -0
  414. melara-0.1.0/src/melara/operations/getmodels.py +277 -0
  415. melara-0.1.0/src/melara/operations/sendchatcompletionrequest.py +156 -0
  416. melara-0.1.0/src/melara/py.typed +2 -0
  417. melara-0.1.0/src/melara/realtime.py +253 -0
  418. melara-0.1.0/src/melara/responses.py +1833 -0
  419. melara-0.1.0/src/melara/sdk.py +222 -0
  420. melara-0.1.0/src/melara/sdkconfiguration.py +63 -0
  421. melara-0.1.0/src/melara/stt.py +469 -0
  422. melara-0.1.0/src/melara/tts.py +520 -0
  423. melara-0.1.0/src/melara/types/__init__.py +25 -0
  424. melara-0.1.0/src/melara/types/base64fileinput.py +45 -0
  425. melara-0.1.0/src/melara/types/basemodel.py +78 -0
  426. melara-0.1.0/src/melara/utils/__init__.py +182 -0
  427. melara-0.1.0/src/melara/utils/annotations.py +81 -0
  428. melara-0.1.0/src/melara/utils/datetimes.py +24 -0
  429. melara-0.1.0/src/melara/utils/dynamic_imports.py +56 -0
  430. melara-0.1.0/src/melara/utils/enums.py +135 -0
  431. melara-0.1.0/src/melara/utils/eventstreaming.py +347 -0
  432. melara-0.1.0/src/melara/utils/forms.py +241 -0
  433. melara-0.1.0/src/melara/utils/headers.py +137 -0
  434. melara-0.1.0/src/melara/utils/logger.py +29 -0
  435. melara-0.1.0/src/melara/utils/metadata.py +120 -0
  436. melara-0.1.0/src/melara/utils/queryparams.py +219 -0
  437. melara-0.1.0/src/melara/utils/requestbodies.py +69 -0
  438. melara-0.1.0/src/melara/utils/retries.py +358 -0
  439. melara-0.1.0/src/melara/utils/security.py +217 -0
  440. melara-0.1.0/src/melara/utils/serializers.py +308 -0
  441. melara-0.1.0/src/melara/utils/unions.py +43 -0
  442. melara-0.1.0/src/melara/utils/unmarshal_json_response.py +40 -0
  443. melara-0.1.0/src/melara/utils/url.py +156 -0
  444. melara-0.1.0/src/melara/utils/values.py +139 -0
  445. melara-0.1.0/src/melara.egg-info/PKG-INFO +106 -0
  446. melara-0.1.0/src/melara.egg-info/SOURCES.txt +451 -0
  447. melara-0.1.0/src/melara.egg-info/dependency_links.txt +1 -0
  448. melara-0.1.0/src/melara.egg-info/requires.txt +5 -0
  449. melara-0.1.0/src/melara.egg-info/top_level.txt +1 -0
  450. melara-0.1.0/tests/test_melara.py +350 -0
  451. melara-0.1.0/tests/test_realtime.py +153 -0
  452. melara-0.1.0/tests/test_responses_namespace.py +11 -0
  453. melara-0.1.0/tests/test_web_search_tools.py +12 -0
melara-0.1.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
melara-0.1.0/NOTICE ADDED
@@ -0,0 +1 @@
1
+ Melara Python SDK is a modified version of OpenRouter Python SDK, upstream commit d88798ad7c0ccaced86d71a5c6e44209ba7e7192, licensed under Apache-2.0. The upstream LICENSE is retained unchanged.
melara-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.4
2
+ Name: melara
3
+ Version: 0.1.0
4
+ Summary: Official Python Client SDK for Melara.
5
+ Author: Melara
6
+ License-Expression: Apache-2.0
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ License-File: NOTICE
11
+ Requires-Dist: httpcore>=1.0.9
12
+ Requires-Dist: httpx>=0.28.1
13
+ Requires-Dist: jsonpath-python>=1.0.6
14
+ Requires-Dist: pydantic<2.13,>=2.11.2
15
+ Requires-Dist: websockets<18,>=13.0
16
+ Dynamic: license-file
17
+
18
+ <!-- Modified for Melara under Apache-2.0. -->
19
+ # Melara Python SDK
20
+
21
+ Install with `pip install melara`. Python 3.10 or later is required.
22
+
23
+ ```python
24
+ import os
25
+ from melara import Melara
26
+
27
+ with Melara(api_key=os.environ["MELARA_API_KEY"],
28
+ app_name="Example app", app_url="https://app.example") as client:
29
+ result = client.chat.send(
30
+ model="your-model-id",
31
+ messages=[{"role": "user", "content": "Hello"}],
32
+ provider={"zdr": True},
33
+ )
34
+ print(result.choices[0].message.content)
35
+ ```
36
+
37
+ The default base URL is Melara's public API, read from `sdks/endpoints.json` and
38
+ packaged as JSON data. Set `MELARA_BASE_URL` or `server_url` to use another
39
+ inference base, including `/v1`.
40
+ An explicit value takes precedence over the environment. Authentication uses
41
+ `api_key` or `MELARA_API_KEY`; a callable key is evaluated per request.
42
+
43
+ Resources: `chat.send`, `responses.send`, `embeddings.generate`, `models.list`,
44
+ `images.generate`, `tts.create_speech`, and
45
+ `stt.create_transcription_multipart` with a required uploaded file. Each has an `_async` counterpart.
46
+ `beta.responses` remains a deprecated alias of `responses`.
47
+ Model listing returns the gateway's OpenAI model records in `response.result`;
48
+ there is no catalog filtering or pagination (`response.next()` returns `None`).
49
+ Images use `/images/generations` and accept URL or base64 results.
50
+ Account, management, catalog and native Messages clients are outside
51
+ this package's current surface. It does not expose file, batch, video, OAuth,
52
+ decision, provider-admin, or upstream-only server-tool APIs.
53
+
54
+ ## Realtime
55
+
56
+ `client.realtime.connect(model=...)` opens a Realtime voice and text session over
57
+ `/v1/realtime` from a trusted server, with the API key in a header. Send protocol
58
+ events as dictionaries and iterate the session for server events; iteration ends
59
+ when the server closes normally, and an abnormal close raises `RealtimeError` with
60
+ its `code` and `reason`. `connect_async` is the asyncio form.
61
+
62
+ ```python
63
+ with Melara(api_key=os.environ["MELARA_API_KEY"]) as client:
64
+ with client.realtime.connect(model="your-realtime-model") as session:
65
+ session.send({"type": "response.create", "response": {"output_modalities": ["text"]}})
66
+ for event in session:
67
+ if event["type"] == "response.output_text.delta":
68
+ print(event["delta"], end="")
69
+ if event["type"] == "response.done":
70
+ break
71
+ ```
72
+
73
+ For a browser, call `client.realtime.client_secrets.create(model=...)` on your
74
+ server and hand the returned `value` and `url` to the page. The secret is short-lived
75
+ and opens one session without exposing the API key.
76
+
77
+ App attribution uses `app_name` and `app_url`, with per-call overrides, sent as
78
+ `X-Melara-App-Name` and `X-Melara-App-Url`. The documented legacy `X-Title` and
79
+ `HTTP-Referer` headers are also accepted through `http_headers` and normalized.
80
+ The SDK serializes `provider.zdr`; enforcement belongs to the gateway and is
81
+ not certified by the SDK's fixture tests. Other routing preferences depend on
82
+ the selected model and gateway support.
83
+
84
+ ```python
85
+ from melara import errors
86
+
87
+ try:
88
+ result = client.chat.send(model="your-model-id", messages=[])
89
+ except errors.PaymentRequiredResponseError as error:
90
+ print(error.data.error.code) # e.g. no_credits or credits_exhausted
91
+ ```
92
+
93
+ Typed errors preserve string or numeric codes, optional messages, metadata,
94
+ HTTP status, headers and the raw response. A missing message uses the code.
95
+ Raw response data is for diagnostics; applications control error presentation.
96
+
97
+ Streaming uses the inherited SSE parser and context-managed streams. Use
98
+ `stream=True` with `chat.send` or `responses.send`, and close streams when done.
99
+ Injected HTTPX clients remain caller-owned. Request retries and timeout controls
100
+ are inherited; pass `retry_config=None` to disable automatic retries. Applications
101
+ must coordinate their own service-wide request limits.
102
+
103
+ There are no SDK telemetry exporters, install-time update checks, remote schema
104
+ checks, automatic publishing, or paid regeneration in this fork. Extension hooks
105
+ remain in `melara._hooks.registration.init_hooks`. See [FORK_CHANGES.md](FORK_CHANGES.md)
106
+ for source provenance, licensing, exact changes and deterministic upstream replay.
@@ -0,0 +1,89 @@
1
+ <!-- Modified for Melara under Apache-2.0. -->
2
+ # Melara Python SDK
3
+
4
+ Install with `pip install melara`. Python 3.10 or later is required.
5
+
6
+ ```python
7
+ import os
8
+ from melara import Melara
9
+
10
+ with Melara(api_key=os.environ["MELARA_API_KEY"],
11
+ app_name="Example app", app_url="https://app.example") as client:
12
+ result = client.chat.send(
13
+ model="your-model-id",
14
+ messages=[{"role": "user", "content": "Hello"}],
15
+ provider={"zdr": True},
16
+ )
17
+ print(result.choices[0].message.content)
18
+ ```
19
+
20
+ The default base URL is Melara's public API, read from `sdks/endpoints.json` and
21
+ packaged as JSON data. Set `MELARA_BASE_URL` or `server_url` to use another
22
+ inference base, including `/v1`.
23
+ An explicit value takes precedence over the environment. Authentication uses
24
+ `api_key` or `MELARA_API_KEY`; a callable key is evaluated per request.
25
+
26
+ Resources: `chat.send`, `responses.send`, `embeddings.generate`, `models.list`,
27
+ `images.generate`, `tts.create_speech`, and
28
+ `stt.create_transcription_multipart` with a required uploaded file. Each has an `_async` counterpart.
29
+ `beta.responses` remains a deprecated alias of `responses`.
30
+ Model listing returns the gateway's OpenAI model records in `response.result`;
31
+ there is no catalog filtering or pagination (`response.next()` returns `None`).
32
+ Images use `/images/generations` and accept URL or base64 results.
33
+ Account, management, catalog and native Messages clients are outside
34
+ this package's current surface. It does not expose file, batch, video, OAuth,
35
+ decision, provider-admin, or upstream-only server-tool APIs.
36
+
37
+ ## Realtime
38
+
39
+ `client.realtime.connect(model=...)` opens a Realtime voice and text session over
40
+ `/v1/realtime` from a trusted server, with the API key in a header. Send protocol
41
+ events as dictionaries and iterate the session for server events; iteration ends
42
+ when the server closes normally, and an abnormal close raises `RealtimeError` with
43
+ its `code` and `reason`. `connect_async` is the asyncio form.
44
+
45
+ ```python
46
+ with Melara(api_key=os.environ["MELARA_API_KEY"]) as client:
47
+ with client.realtime.connect(model="your-realtime-model") as session:
48
+ session.send({"type": "response.create", "response": {"output_modalities": ["text"]}})
49
+ for event in session:
50
+ if event["type"] == "response.output_text.delta":
51
+ print(event["delta"], end="")
52
+ if event["type"] == "response.done":
53
+ break
54
+ ```
55
+
56
+ For a browser, call `client.realtime.client_secrets.create(model=...)` on your
57
+ server and hand the returned `value` and `url` to the page. The secret is short-lived
58
+ and opens one session without exposing the API key.
59
+
60
+ App attribution uses `app_name` and `app_url`, with per-call overrides, sent as
61
+ `X-Melara-App-Name` and `X-Melara-App-Url`. The documented legacy `X-Title` and
62
+ `HTTP-Referer` headers are also accepted through `http_headers` and normalized.
63
+ The SDK serializes `provider.zdr`; enforcement belongs to the gateway and is
64
+ not certified by the SDK's fixture tests. Other routing preferences depend on
65
+ the selected model and gateway support.
66
+
67
+ ```python
68
+ from melara import errors
69
+
70
+ try:
71
+ result = client.chat.send(model="your-model-id", messages=[])
72
+ except errors.PaymentRequiredResponseError as error:
73
+ print(error.data.error.code) # e.g. no_credits or credits_exhausted
74
+ ```
75
+
76
+ Typed errors preserve string or numeric codes, optional messages, metadata,
77
+ HTTP status, headers and the raw response. A missing message uses the code.
78
+ Raw response data is for diagnostics; applications control error presentation.
79
+
80
+ Streaming uses the inherited SSE parser and context-managed streams. Use
81
+ `stream=True` with `chat.send` or `responses.send`, and close streams when done.
82
+ Injected HTTPX clients remain caller-owned. Request retries and timeout controls
83
+ are inherited; pass `retry_config=None` to disable automatic retries. Applications
84
+ must coordinate their own service-wide request limits.
85
+
86
+ There are no SDK telemetry exporters, install-time update checks, remote schema
87
+ checks, automatic publishing, or paid regeneration in this fork. Extension hooks
88
+ remain in `melara._hooks.registration.init_hooks`. See [FORK_CHANGES.md](FORK_CHANGES.md)
89
+ for source provenance, licensing, exact changes and deterministic upstream replay.
melara-0.1.0/README.md ADDED
@@ -0,0 +1,89 @@
1
+ <!-- Modified for Melara under Apache-2.0. -->
2
+ # Melara Python SDK
3
+
4
+ Install with `pip install melara`. Python 3.10 or later is required.
5
+
6
+ ```python
7
+ import os
8
+ from melara import Melara
9
+
10
+ with Melara(api_key=os.environ["MELARA_API_KEY"],
11
+ app_name="Example app", app_url="https://app.example") as client:
12
+ result = client.chat.send(
13
+ model="your-model-id",
14
+ messages=[{"role": "user", "content": "Hello"}],
15
+ provider={"zdr": True},
16
+ )
17
+ print(result.choices[0].message.content)
18
+ ```
19
+
20
+ The default base URL is Melara's public API, read from `sdks/endpoints.json` and
21
+ packaged as JSON data. Set `MELARA_BASE_URL` or `server_url` to use another
22
+ inference base, including `/v1`.
23
+ An explicit value takes precedence over the environment. Authentication uses
24
+ `api_key` or `MELARA_API_KEY`; a callable key is evaluated per request.
25
+
26
+ Resources: `chat.send`, `responses.send`, `embeddings.generate`, `models.list`,
27
+ `images.generate`, `tts.create_speech`, and
28
+ `stt.create_transcription_multipart` with a required uploaded file. Each has an `_async` counterpart.
29
+ `beta.responses` remains a deprecated alias of `responses`.
30
+ Model listing returns the gateway's OpenAI model records in `response.result`;
31
+ there is no catalog filtering or pagination (`response.next()` returns `None`).
32
+ Images use `/images/generations` and accept URL or base64 results.
33
+ Account, management, catalog and native Messages clients are outside
34
+ this package's current surface. It does not expose file, batch, video, OAuth,
35
+ decision, provider-admin, or upstream-only server-tool APIs.
36
+
37
+ ## Realtime
38
+
39
+ `client.realtime.connect(model=...)` opens a Realtime voice and text session over
40
+ `/v1/realtime` from a trusted server, with the API key in a header. Send protocol
41
+ events as dictionaries and iterate the session for server events; iteration ends
42
+ when the server closes normally, and an abnormal close raises `RealtimeError` with
43
+ its `code` and `reason`. `connect_async` is the asyncio form.
44
+
45
+ ```python
46
+ with Melara(api_key=os.environ["MELARA_API_KEY"]) as client:
47
+ with client.realtime.connect(model="your-realtime-model") as session:
48
+ session.send({"type": "response.create", "response": {"output_modalities": ["text"]}})
49
+ for event in session:
50
+ if event["type"] == "response.output_text.delta":
51
+ print(event["delta"], end="")
52
+ if event["type"] == "response.done":
53
+ break
54
+ ```
55
+
56
+ For a browser, call `client.realtime.client_secrets.create(model=...)` on your
57
+ server and hand the returned `value` and `url` to the page. The secret is short-lived
58
+ and opens one session without exposing the API key.
59
+
60
+ App attribution uses `app_name` and `app_url`, with per-call overrides, sent as
61
+ `X-Melara-App-Name` and `X-Melara-App-Url`. The documented legacy `X-Title` and
62
+ `HTTP-Referer` headers are also accepted through `http_headers` and normalized.
63
+ The SDK serializes `provider.zdr`; enforcement belongs to the gateway and is
64
+ not certified by the SDK's fixture tests. Other routing preferences depend on
65
+ the selected model and gateway support.
66
+
67
+ ```python
68
+ from melara import errors
69
+
70
+ try:
71
+ result = client.chat.send(model="your-model-id", messages=[])
72
+ except errors.PaymentRequiredResponseError as error:
73
+ print(error.data.error.code) # e.g. no_credits or credits_exhausted
74
+ ```
75
+
76
+ Typed errors preserve string or numeric codes, optional messages, metadata,
77
+ HTTP status, headers and the raw response. A missing message uses the code.
78
+ Raw response data is for diagnostics; applications control error presentation.
79
+
80
+ Streaming uses the inherited SSE parser and context-managed streams. Use
81
+ `stream=True` with `chat.send` or `responses.send`, and close streams when done.
82
+ Injected HTTPX clients remain caller-owned. Request retries and timeout controls
83
+ are inherited; pass `retry_config=None` to disable automatic retries. Applications
84
+ must coordinate their own service-wide request limits.
85
+
86
+ There are no SDK telemetry exporters, install-time update checks, remote schema
87
+ checks, automatic publishing, or paid regeneration in this fork. Extension hooks
88
+ remain in `melara._hooks.registration.init_hooks`. See [FORK_CHANGES.md](FORK_CHANGES.md)
89
+ for source provenance, licensing, exact changes and deterministic upstream replay.
@@ -0,0 +1,56 @@
1
+ # Modified for Melara under Apache-2.0.
2
+ [project]
3
+ name = "melara"
4
+ version = "0.1.0"
5
+ description = "Official Python Client SDK for Melara."
6
+ authors = [{ name = "Melara" },]
7
+ readme = "README-PYPI.md"
8
+ requires-python = ">=3.10"
9
+ dependencies = [
10
+ "httpcore >=1.0.9",
11
+ "httpx >=0.28.1",
12
+ "jsonpath-python >=1.0.6",
13
+ "pydantic >=2.11.2,<2.13",
14
+ "websockets >=13.0,<18",
15
+ ]
16
+ license = "Apache-2.0"
17
+ license-files = ["LICENSE", "NOTICE"]
18
+
19
+ [dependency-groups]
20
+ dev = [
21
+ "mypy ==1.15.0",
22
+ "pylint ==3.2.3",
23
+ "pyright ==1.1.398",
24
+ ]
25
+
26
+ [tool.setuptools.packages.find]
27
+ where = ["src"]
28
+
29
+ [tool.setuptools.package-data]
30
+ "*" = ["py.typed", "endpoints.json"]
31
+
32
+ [build-system]
33
+ requires = ["setuptools>=80", "wheel"]
34
+ build-backend = "setuptools.build_meta"
35
+
36
+ [tool.pytest.ini_options]
37
+ asyncio_default_fixture_loop_scope = "function"
38
+ pythonpath = ["src"]
39
+
40
+ [tool.mypy]
41
+ disable_error_code = "misc"
42
+ explicit_package_bases = true
43
+ mypy_path = "src"
44
+
45
+ [[tool.mypy.overrides]]
46
+ module = "typing_inspect"
47
+ ignore_missing_imports = true
48
+
49
+ [[tool.mypy.overrides]]
50
+ module = "jsonpath"
51
+ ignore_missing_imports = true
52
+
53
+ [tool.pyright]
54
+ venvPath = "."
55
+ venv = ".venv"
56
+
melara-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,18 @@
1
+ # Modified for Melara under Apache-2.0.
2
+ """Code generated by Speakeasy (https://speakeasy.com)."""
3
+
4
+ from ._version import (
5
+ __title__,
6
+ __version__,
7
+ __openapi_doc_version__,
8
+ __gen_version__,
9
+ __user_agent__,
10
+ )
11
+ from .sdk import *
12
+ from .sdkconfiguration import *
13
+
14
+
15
+ VERSION: str = __version__
16
+ OPENAPI_DOC_VERSION = __openapi_doc_version__
17
+ SPEAKEASY_GENERATOR_VERSION = __gen_version__
18
+ USER_AGENT = __user_agent__
@@ -0,0 +1,6 @@
1
+ # Modified for Melara under Apache-2.0.
2
+ """Code generated by Speakeasy (https://speakeasy.com)."""
3
+
4
+ from .sdkhooks import *
5
+ from .types import *
6
+ from .registration import *
@@ -0,0 +1,14 @@
1
+ # Modified for Melara under Apache-2.0.
2
+ from .types import Hooks
3
+
4
+
5
+ # This file is only ever generated once on the first generation and then is free to be modified.
6
+ # Any hooks you wish to add should be registered in the init_hooks function. Feel free to define them
7
+ # in this file or in separate files in the hooks folder.
8
+
9
+
10
+ def init_hooks(hooks: Hooks):
11
+ # pylint: disable=unused-argument
12
+ """Add hooks by calling hooks.register{sdk_init/before_request/after_success/after_error}Hook
13
+ with an instance of a hook that implements that specific Hook interface
14
+ Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance"""
@@ -0,0 +1,77 @@
1
+ # Modified for Melara under Apache-2.0.
2
+ """Code generated by Speakeasy (https://speakeasy.com)."""
3
+
4
+ import httpx
5
+ from .types import (
6
+ SDKInitHook,
7
+ BeforeRequestContext,
8
+ BeforeRequestHook,
9
+ AfterSuccessContext,
10
+ AfterSuccessHook,
11
+ AfterErrorContext,
12
+ AfterErrorHook,
13
+ Hooks,
14
+ )
15
+ from .registration import init_hooks
16
+ from typing import List, Optional, Tuple
17
+ from melara.sdkconfiguration import SDKConfiguration
18
+
19
+
20
+ class SDKHooks(Hooks):
21
+ def __init__(self) -> None:
22
+ self.sdk_init_hooks: List[SDKInitHook] = []
23
+ self.before_request_hooks: List[BeforeRequestHook] = []
24
+ self.after_success_hooks: List[AfterSuccessHook] = []
25
+ self.after_error_hooks: List[AfterErrorHook] = []
26
+ init_hooks(self)
27
+
28
+ def register_sdk_init_hook(self, hook: SDKInitHook) -> None:
29
+ self.sdk_init_hooks.append(hook)
30
+
31
+ def register_before_request_hook(self, hook: BeforeRequestHook) -> None:
32
+ self.before_request_hooks.append(hook)
33
+
34
+ def register_after_success_hook(self, hook: AfterSuccessHook) -> None:
35
+ self.after_success_hooks.append(hook)
36
+
37
+ def register_after_error_hook(self, hook: AfterErrorHook) -> None:
38
+ self.after_error_hooks.append(hook)
39
+
40
+ def sdk_init(self, config: SDKConfiguration) -> SDKConfiguration:
41
+ for hook in self.sdk_init_hooks:
42
+ config = hook.sdk_init(config)
43
+ return config
44
+
45
+ def before_request(
46
+ self, hook_ctx: BeforeRequestContext, request: httpx.Request
47
+ ) -> httpx.Request:
48
+ for hook in self.before_request_hooks:
49
+ out = hook.before_request(hook_ctx, request)
50
+ if isinstance(out, Exception):
51
+ raise out
52
+ request = out
53
+
54
+ return request
55
+
56
+ def after_success(
57
+ self, hook_ctx: AfterSuccessContext, response: httpx.Response
58
+ ) -> httpx.Response:
59
+ for hook in self.after_success_hooks:
60
+ out = hook.after_success(hook_ctx, response)
61
+ if isinstance(out, Exception):
62
+ raise out
63
+ response = out
64
+ return response
65
+
66
+ def after_error(
67
+ self,
68
+ hook_ctx: AfterErrorContext,
69
+ response: Optional[httpx.Response],
70
+ error: Optional[Exception],
71
+ ) -> Tuple[Optional[httpx.Response], Optional[Exception]]:
72
+ for hook in self.after_error_hooks:
73
+ result = hook.after_error(hook_ctx, response, error)
74
+ if isinstance(result, Exception):
75
+ raise result
76
+ response, error = result
77
+ return response, error