openapi.json 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115
  1. {
  2. "openapi": "3.0.0",
  3. "info": {
  4. "title": "opencode",
  5. "description": "opencode api",
  6. "version": "1.0.0"
  7. },
  8. "paths": {
  9. "/event": {
  10. "get": {
  11. "responses": {
  12. "200": {
  13. "description": "Event stream",
  14. "content": {
  15. "application/json": {
  16. "schema": {
  17. "$ref": "#/components/schemas/Event"
  18. }
  19. }
  20. }
  21. }
  22. },
  23. "operationId": "getEvent",
  24. "parameters": [],
  25. "description": "Get events"
  26. }
  27. },
  28. "/app_info": {
  29. "post": {
  30. "responses": {
  31. "200": {
  32. "description": "200",
  33. "content": {
  34. "application/json": {
  35. "schema": {
  36. "$ref": "#/components/schemas/App.Info"
  37. }
  38. }
  39. }
  40. }
  41. },
  42. "operationId": "postApp_info",
  43. "parameters": [],
  44. "description": "Get app info"
  45. }
  46. },
  47. "/app_initialize": {
  48. "post": {
  49. "responses": {
  50. "200": {
  51. "description": "Initialize the app",
  52. "content": {
  53. "application/json": {
  54. "schema": {
  55. "type": "boolean"
  56. }
  57. }
  58. }
  59. }
  60. },
  61. "operationId": "postApp_initialize",
  62. "parameters": [],
  63. "description": "Initialize the app"
  64. }
  65. },
  66. "/session_initialize": {
  67. "post": {
  68. "responses": {
  69. "200": {
  70. "description": "200",
  71. "content": {
  72. "application/json": {
  73. "schema": {
  74. "type": "boolean"
  75. }
  76. }
  77. }
  78. }
  79. },
  80. "operationId": "postSession_initialize",
  81. "parameters": [],
  82. "description": "Analyze the app and create an AGENTS.md file",
  83. "requestBody": {
  84. "content": {
  85. "application/json": {
  86. "schema": {
  87. "type": "object",
  88. "properties": {
  89. "sessionID": {
  90. "type": "string"
  91. },
  92. "providerID": {
  93. "type": "string"
  94. },
  95. "modelID": {
  96. "type": "string"
  97. }
  98. },
  99. "required": [
  100. "sessionID",
  101. "providerID",
  102. "modelID"
  103. ]
  104. }
  105. }
  106. }
  107. }
  108. }
  109. },
  110. "/path_get": {
  111. "post": {
  112. "responses": {
  113. "200": {
  114. "description": "200",
  115. "content": {
  116. "application/json": {
  117. "schema": {
  118. "type": "object",
  119. "properties": {
  120. "root": {
  121. "type": "string"
  122. },
  123. "data": {
  124. "type": "string"
  125. },
  126. "cwd": {
  127. "type": "string"
  128. },
  129. "config": {
  130. "type": "string"
  131. }
  132. },
  133. "required": [
  134. "root",
  135. "data",
  136. "cwd",
  137. "config"
  138. ]
  139. }
  140. }
  141. }
  142. }
  143. },
  144. "operationId": "postPath_get",
  145. "parameters": [],
  146. "description": "Get paths"
  147. }
  148. },
  149. "/session_create": {
  150. "post": {
  151. "responses": {
  152. "200": {
  153. "description": "Successfully created session",
  154. "content": {
  155. "application/json": {
  156. "schema": {
  157. "$ref": "#/components/schemas/session.info"
  158. }
  159. }
  160. }
  161. }
  162. },
  163. "operationId": "postSession_create",
  164. "parameters": [],
  165. "description": "Create a new session"
  166. }
  167. },
  168. "/session_share": {
  169. "post": {
  170. "responses": {
  171. "200": {
  172. "description": "Successfully shared session",
  173. "content": {
  174. "application/json": {
  175. "schema": {
  176. "$ref": "#/components/schemas/session.info"
  177. }
  178. }
  179. }
  180. }
  181. },
  182. "operationId": "postSession_share",
  183. "parameters": [],
  184. "description": "Share the session",
  185. "requestBody": {
  186. "content": {
  187. "application/json": {
  188. "schema": {
  189. "type": "object",
  190. "properties": {
  191. "sessionID": {
  192. "type": "string"
  193. }
  194. },
  195. "required": [
  196. "sessionID"
  197. ]
  198. }
  199. }
  200. }
  201. }
  202. }
  203. },
  204. "/session_messages": {
  205. "post": {
  206. "responses": {
  207. "200": {
  208. "description": "Successfully created session",
  209. "content": {
  210. "application/json": {
  211. "schema": {
  212. "type": "array",
  213. "items": {
  214. "$ref": "#/components/schemas/Message.Info"
  215. }
  216. }
  217. }
  218. }
  219. }
  220. },
  221. "operationId": "postSession_messages",
  222. "parameters": [],
  223. "description": "Get messages for a session",
  224. "requestBody": {
  225. "content": {
  226. "application/json": {
  227. "schema": {
  228. "type": "object",
  229. "properties": {
  230. "sessionID": {
  231. "type": "string"
  232. }
  233. },
  234. "required": [
  235. "sessionID"
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. }
  242. },
  243. "/session_list": {
  244. "post": {
  245. "responses": {
  246. "200": {
  247. "description": "List of sessions",
  248. "content": {
  249. "application/json": {
  250. "schema": {
  251. "type": "array",
  252. "items": {
  253. "$ref": "#/components/schemas/session.info"
  254. }
  255. }
  256. }
  257. }
  258. }
  259. },
  260. "operationId": "postSession_list",
  261. "parameters": [],
  262. "description": "List all sessions"
  263. }
  264. },
  265. "/session_abort": {
  266. "post": {
  267. "responses": {
  268. "200": {
  269. "description": "Aborted session",
  270. "content": {
  271. "application/json": {
  272. "schema": {
  273. "type": "boolean"
  274. }
  275. }
  276. }
  277. }
  278. },
  279. "operationId": "postSession_abort",
  280. "parameters": [],
  281. "description": "Abort a session",
  282. "requestBody": {
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "sessionID": {
  289. "type": "string"
  290. }
  291. },
  292. "required": [
  293. "sessionID"
  294. ]
  295. }
  296. }
  297. }
  298. }
  299. }
  300. },
  301. "/session_summarize": {
  302. "post": {
  303. "responses": {
  304. "200": {
  305. "description": "Summarize the session",
  306. "content": {
  307. "application/json": {
  308. "schema": {
  309. "type": "boolean"
  310. }
  311. }
  312. }
  313. }
  314. },
  315. "operationId": "postSession_summarize",
  316. "parameters": [],
  317. "description": "Summarize the session",
  318. "requestBody": {
  319. "content": {
  320. "application/json": {
  321. "schema": {
  322. "type": "object",
  323. "properties": {
  324. "sessionID": {
  325. "type": "string"
  326. },
  327. "providerID": {
  328. "type": "string"
  329. },
  330. "modelID": {
  331. "type": "string"
  332. }
  333. },
  334. "required": [
  335. "sessionID",
  336. "providerID",
  337. "modelID"
  338. ]
  339. }
  340. }
  341. }
  342. }
  343. }
  344. },
  345. "/session_chat": {
  346. "post": {
  347. "responses": {
  348. "200": {
  349. "description": "Chat with a model",
  350. "content": {
  351. "application/json": {
  352. "schema": {
  353. "$ref": "#/components/schemas/Message.Info"
  354. }
  355. }
  356. }
  357. }
  358. },
  359. "operationId": "postSession_chat",
  360. "parameters": [],
  361. "description": "Chat with a model",
  362. "requestBody": {
  363. "content": {
  364. "application/json": {
  365. "schema": {
  366. "type": "object",
  367. "properties": {
  368. "sessionID": {
  369. "type": "string"
  370. },
  371. "providerID": {
  372. "type": "string"
  373. },
  374. "modelID": {
  375. "type": "string"
  376. },
  377. "parts": {
  378. "type": "array",
  379. "items": {
  380. "$ref": "#/components/schemas/Message.Part"
  381. }
  382. }
  383. },
  384. "required": [
  385. "sessionID",
  386. "providerID",
  387. "modelID",
  388. "parts"
  389. ]
  390. }
  391. }
  392. }
  393. }
  394. }
  395. },
  396. "/provider_list": {
  397. "post": {
  398. "responses": {
  399. "200": {
  400. "description": "List of providers",
  401. "content": {
  402. "application/json": {
  403. "schema": {
  404. "type": "array",
  405. "items": {
  406. "$ref": "#/components/schemas/Provider.Info"
  407. }
  408. }
  409. }
  410. }
  411. }
  412. },
  413. "operationId": "postProvider_list",
  414. "parameters": [],
  415. "description": "List all providers"
  416. }
  417. }
  418. },
  419. "components": {
  420. "schemas": {
  421. "Event": {
  422. "oneOf": [
  423. {
  424. "$ref": "#/components/schemas/Event.storage.write"
  425. },
  426. {
  427. "$ref": "#/components/schemas/Event.message.updated"
  428. },
  429. {
  430. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  431. },
  432. {
  433. "$ref": "#/components/schemas/Event.permission.updated"
  434. },
  435. {
  436. "$ref": "#/components/schemas/Event.session.updated"
  437. }
  438. ],
  439. "discriminator": {
  440. "propertyName": "type",
  441. "mapping": {
  442. "storage.write": "#/components/schemas/Event.storage.write",
  443. "message.updated": "#/components/schemas/Event.message.updated",
  444. "lsp.client.diagnostics": "#/components/schemas/Event.lsp.client.diagnostics",
  445. "permission.updated": "#/components/schemas/Event.permission.updated",
  446. "session.updated": "#/components/schemas/Event.session.updated"
  447. }
  448. }
  449. },
  450. "Event.storage.write": {
  451. "type": "object",
  452. "properties": {
  453. "type": {
  454. "type": "string",
  455. "const": "storage.write"
  456. },
  457. "properties": {
  458. "type": "object",
  459. "properties": {
  460. "key": {
  461. "type": "string"
  462. },
  463. "content": {}
  464. },
  465. "required": [
  466. "key"
  467. ]
  468. }
  469. },
  470. "required": [
  471. "type",
  472. "properties"
  473. ]
  474. },
  475. "Event.message.updated": {
  476. "type": "object",
  477. "properties": {
  478. "type": {
  479. "type": "string",
  480. "const": "message.updated"
  481. },
  482. "properties": {
  483. "type": "object",
  484. "properties": {
  485. "info": {
  486. "$ref": "#/components/schemas/Message.Info"
  487. }
  488. },
  489. "required": [
  490. "info"
  491. ]
  492. }
  493. },
  494. "required": [
  495. "type",
  496. "properties"
  497. ]
  498. },
  499. "Message.Info": {
  500. "type": "object",
  501. "properties": {
  502. "id": {
  503. "type": "string"
  504. },
  505. "role": {
  506. "type": "string",
  507. "enum": [
  508. "system",
  509. "user",
  510. "assistant"
  511. ]
  512. },
  513. "parts": {
  514. "type": "array",
  515. "items": {
  516. "$ref": "#/components/schemas/Message.Part"
  517. }
  518. },
  519. "metadata": {
  520. "type": "object",
  521. "properties": {
  522. "time": {
  523. "type": "object",
  524. "properties": {
  525. "created": {
  526. "type": "number"
  527. },
  528. "completed": {
  529. "type": "number"
  530. }
  531. },
  532. "required": [
  533. "created"
  534. ]
  535. },
  536. "sessionID": {
  537. "type": "string"
  538. },
  539. "tool": {
  540. "type": "object",
  541. "additionalProperties": {}
  542. },
  543. "assistant": {
  544. "type": "object",
  545. "properties": {
  546. "modelID": {
  547. "type": "string"
  548. },
  549. "providerID": {
  550. "type": "string"
  551. },
  552. "cost": {
  553. "type": "number"
  554. },
  555. "summary": {
  556. "type": "boolean"
  557. },
  558. "tokens": {
  559. "type": "object",
  560. "properties": {
  561. "input": {
  562. "type": "number"
  563. },
  564. "output": {
  565. "type": "number"
  566. },
  567. "reasoning": {
  568. "type": "number"
  569. }
  570. },
  571. "required": [
  572. "input",
  573. "output",
  574. "reasoning"
  575. ]
  576. }
  577. },
  578. "required": [
  579. "modelID",
  580. "providerID",
  581. "cost",
  582. "tokens"
  583. ]
  584. }
  585. },
  586. "required": [
  587. "time",
  588. "sessionID",
  589. "tool"
  590. ]
  591. }
  592. },
  593. "required": [
  594. "id",
  595. "role",
  596. "parts",
  597. "metadata"
  598. ]
  599. },
  600. "Message.Part": {
  601. "oneOf": [
  602. {
  603. "$ref": "#/components/schemas/Message.Part.Text"
  604. },
  605. {
  606. "$ref": "#/components/schemas/Message.Part.Reasoning"
  607. },
  608. {
  609. "$ref": "#/components/schemas/Message.Part.ToolInvocation"
  610. },
  611. {
  612. "$ref": "#/components/schemas/Message.Part.SourceUrl"
  613. },
  614. {
  615. "$ref": "#/components/schemas/Message.Part.File"
  616. },
  617. {
  618. "$ref": "#/components/schemas/Message.Part.StepStart"
  619. }
  620. ],
  621. "discriminator": {
  622. "propertyName": "type",
  623. "mapping": {
  624. "text": "#/components/schemas/Message.Part.Text",
  625. "reasoning": "#/components/schemas/Message.Part.Reasoning",
  626. "tool-invocation": "#/components/schemas/Message.Part.ToolInvocation",
  627. "source-url": "#/components/schemas/Message.Part.SourceUrl",
  628. "file": "#/components/schemas/Message.Part.File",
  629. "step-start": "#/components/schemas/Message.Part.StepStart"
  630. }
  631. }
  632. },
  633. "Message.Part.Text": {
  634. "type": "object",
  635. "properties": {
  636. "type": {
  637. "type": "string",
  638. "const": "text"
  639. },
  640. "text": {
  641. "type": "string"
  642. }
  643. },
  644. "required": [
  645. "type",
  646. "text"
  647. ]
  648. },
  649. "Message.Part.Reasoning": {
  650. "type": "object",
  651. "properties": {
  652. "type": {
  653. "type": "string",
  654. "const": "reasoning"
  655. },
  656. "text": {
  657. "type": "string"
  658. },
  659. "providerMetadata": {
  660. "type": "object",
  661. "additionalProperties": {}
  662. }
  663. },
  664. "required": [
  665. "type",
  666. "text"
  667. ]
  668. },
  669. "Message.Part.ToolInvocation": {
  670. "type": "object",
  671. "properties": {
  672. "type": {
  673. "type": "string",
  674. "const": "tool-invocation"
  675. },
  676. "toolInvocation": {
  677. "$ref": "#/components/schemas/Message.ToolInvocation"
  678. }
  679. },
  680. "required": [
  681. "type",
  682. "toolInvocation"
  683. ]
  684. },
  685. "Message.ToolInvocation": {
  686. "oneOf": [
  687. {
  688. "$ref": "#/components/schemas/Message.ToolInvocation.ToolCall"
  689. },
  690. {
  691. "$ref": "#/components/schemas/Message.ToolInvocation.ToolPartialCall"
  692. },
  693. {
  694. "$ref": "#/components/schemas/Message.ToolInvocation.ToolResult"
  695. }
  696. ],
  697. "discriminator": {
  698. "propertyName": "state",
  699. "mapping": {
  700. "call": "#/components/schemas/Message.ToolInvocation.ToolCall",
  701. "partial-call": "#/components/schemas/Message.ToolInvocation.ToolPartialCall",
  702. "result": "#/components/schemas/Message.ToolInvocation.ToolResult"
  703. }
  704. }
  705. },
  706. "Message.ToolInvocation.ToolCall": {
  707. "type": "object",
  708. "properties": {
  709. "state": {
  710. "type": "string",
  711. "const": "call"
  712. },
  713. "step": {
  714. "type": "number"
  715. },
  716. "toolCallId": {
  717. "type": "string"
  718. },
  719. "toolName": {
  720. "type": "string"
  721. },
  722. "args": {}
  723. },
  724. "required": [
  725. "state",
  726. "toolCallId",
  727. "toolName"
  728. ]
  729. },
  730. "Message.ToolInvocation.ToolPartialCall": {
  731. "type": "object",
  732. "properties": {
  733. "state": {
  734. "type": "string",
  735. "const": "partial-call"
  736. },
  737. "step": {
  738. "type": "number"
  739. },
  740. "toolCallId": {
  741. "type": "string"
  742. },
  743. "toolName": {
  744. "type": "string"
  745. },
  746. "args": {}
  747. },
  748. "required": [
  749. "state",
  750. "toolCallId",
  751. "toolName"
  752. ]
  753. },
  754. "Message.ToolInvocation.ToolResult": {
  755. "type": "object",
  756. "properties": {
  757. "state": {
  758. "type": "string",
  759. "const": "result"
  760. },
  761. "step": {
  762. "type": "number"
  763. },
  764. "toolCallId": {
  765. "type": "string"
  766. },
  767. "toolName": {
  768. "type": "string"
  769. },
  770. "args": {},
  771. "result": {
  772. "type": "string"
  773. }
  774. },
  775. "required": [
  776. "state",
  777. "toolCallId",
  778. "toolName",
  779. "result"
  780. ]
  781. },
  782. "Message.Part.SourceUrl": {
  783. "type": "object",
  784. "properties": {
  785. "type": {
  786. "type": "string",
  787. "const": "source-url"
  788. },
  789. "sourceId": {
  790. "type": "string"
  791. },
  792. "url": {
  793. "type": "string"
  794. },
  795. "title": {
  796. "type": "string"
  797. },
  798. "providerMetadata": {
  799. "type": "object",
  800. "additionalProperties": {}
  801. }
  802. },
  803. "required": [
  804. "type",
  805. "sourceId",
  806. "url"
  807. ]
  808. },
  809. "Message.Part.File": {
  810. "type": "object",
  811. "properties": {
  812. "type": {
  813. "type": "string",
  814. "const": "file"
  815. },
  816. "mediaType": {
  817. "type": "string"
  818. },
  819. "filename": {
  820. "type": "string"
  821. },
  822. "url": {
  823. "type": "string"
  824. }
  825. },
  826. "required": [
  827. "type",
  828. "mediaType",
  829. "url"
  830. ]
  831. },
  832. "Message.Part.StepStart": {
  833. "type": "object",
  834. "properties": {
  835. "type": {
  836. "type": "string",
  837. "const": "step-start"
  838. }
  839. },
  840. "required": [
  841. "type"
  842. ]
  843. },
  844. "Event.lsp.client.diagnostics": {
  845. "type": "object",
  846. "properties": {
  847. "type": {
  848. "type": "string",
  849. "const": "lsp.client.diagnostics"
  850. },
  851. "properties": {
  852. "type": "object",
  853. "properties": {
  854. "serverID": {
  855. "type": "string"
  856. },
  857. "path": {
  858. "type": "string"
  859. }
  860. },
  861. "required": [
  862. "serverID",
  863. "path"
  864. ]
  865. }
  866. },
  867. "required": [
  868. "type",
  869. "properties"
  870. ]
  871. },
  872. "Event.permission.updated": {
  873. "type": "object",
  874. "properties": {
  875. "type": {
  876. "type": "string",
  877. "const": "permission.updated"
  878. },
  879. "properties": {
  880. "$ref": "#/components/schemas/permission.info"
  881. }
  882. },
  883. "required": [
  884. "type",
  885. "properties"
  886. ]
  887. },
  888. "permission.info": {
  889. "type": "object",
  890. "properties": {
  891. "id": {
  892. "type": "string"
  893. },
  894. "sessionID": {
  895. "type": "string"
  896. },
  897. "title": {
  898. "type": "string"
  899. },
  900. "metadata": {
  901. "type": "object",
  902. "additionalProperties": {}
  903. },
  904. "time": {
  905. "type": "object",
  906. "properties": {
  907. "created": {
  908. "type": "number"
  909. }
  910. },
  911. "required": [
  912. "created"
  913. ]
  914. }
  915. },
  916. "required": [
  917. "id",
  918. "sessionID",
  919. "title",
  920. "metadata",
  921. "time"
  922. ]
  923. },
  924. "Event.session.updated": {
  925. "type": "object",
  926. "properties": {
  927. "type": {
  928. "type": "string",
  929. "const": "session.updated"
  930. },
  931. "properties": {
  932. "type": "object",
  933. "properties": {
  934. "info": {
  935. "$ref": "#/components/schemas/session.info"
  936. }
  937. },
  938. "required": [
  939. "info"
  940. ]
  941. }
  942. },
  943. "required": [
  944. "type",
  945. "properties"
  946. ]
  947. },
  948. "session.info": {
  949. "type": "object",
  950. "properties": {
  951. "id": {
  952. "type": "string",
  953. "pattern": "^ses"
  954. },
  955. "share": {
  956. "type": "object",
  957. "properties": {
  958. "secret": {
  959. "type": "string"
  960. },
  961. "url": {
  962. "type": "string"
  963. }
  964. },
  965. "required": [
  966. "secret",
  967. "url"
  968. ]
  969. },
  970. "title": {
  971. "type": "string"
  972. },
  973. "time": {
  974. "type": "object",
  975. "properties": {
  976. "created": {
  977. "type": "number"
  978. },
  979. "updated": {
  980. "type": "number"
  981. }
  982. },
  983. "required": [
  984. "created",
  985. "updated"
  986. ]
  987. }
  988. },
  989. "required": [
  990. "id",
  991. "title",
  992. "time"
  993. ]
  994. },
  995. "App.Info": {
  996. "type": "object",
  997. "properties": {
  998. "git": {
  999. "type": "boolean"
  1000. },
  1001. "path": {
  1002. "type": "object",
  1003. "properties": {
  1004. "data": {
  1005. "type": "string"
  1006. },
  1007. "root": {
  1008. "type": "string"
  1009. },
  1010. "cwd": {
  1011. "type": "string"
  1012. }
  1013. },
  1014. "required": [
  1015. "data",
  1016. "root",
  1017. "cwd"
  1018. ]
  1019. },
  1020. "time": {
  1021. "type": "object",
  1022. "properties": {
  1023. "initialized": {
  1024. "type": "number"
  1025. }
  1026. }
  1027. }
  1028. },
  1029. "required": [
  1030. "git",
  1031. "path",
  1032. "time"
  1033. ]
  1034. },
  1035. "Provider.Info": {
  1036. "type": "object",
  1037. "properties": {
  1038. "id": {
  1039. "type": "string"
  1040. },
  1041. "name": {
  1042. "type": "string"
  1043. },
  1044. "options": {
  1045. "type": "object",
  1046. "additionalProperties": {}
  1047. },
  1048. "models": {
  1049. "type": "array",
  1050. "items": {
  1051. "$ref": "#/components/schemas/Provider.Model"
  1052. }
  1053. }
  1054. },
  1055. "required": [
  1056. "id",
  1057. "name",
  1058. "models"
  1059. ]
  1060. },
  1061. "Provider.Model": {
  1062. "type": "object",
  1063. "properties": {
  1064. "id": {
  1065. "type": "string"
  1066. },
  1067. "name": {
  1068. "type": "string"
  1069. },
  1070. "cost": {
  1071. "type": "object",
  1072. "properties": {
  1073. "input": {
  1074. "type": "number"
  1075. },
  1076. "inputCached": {
  1077. "type": "number"
  1078. },
  1079. "output": {
  1080. "type": "number"
  1081. },
  1082. "outputCached": {
  1083. "type": "number"
  1084. }
  1085. },
  1086. "required": [
  1087. "input",
  1088. "inputCached",
  1089. "output",
  1090. "outputCached"
  1091. ]
  1092. },
  1093. "contextWindow": {
  1094. "type": "number"
  1095. },
  1096. "maxOutputTokens": {
  1097. "type": "number"
  1098. },
  1099. "attachment": {
  1100. "type": "boolean"
  1101. },
  1102. "reasoning": {
  1103. "type": "boolean"
  1104. }
  1105. },
  1106. "required": [
  1107. "id",
  1108. "cost",
  1109. "contextWindow",
  1110. "attachment"
  1111. ]
  1112. }
  1113. }
  1114. }
  1115. }