openapi.json 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123
  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. "user": {
  999. "type": "string"
  1000. },
  1001. "git": {
  1002. "type": "boolean"
  1003. },
  1004. "path": {
  1005. "type": "object",
  1006. "properties": {
  1007. "config": {
  1008. "type": "string"
  1009. },
  1010. "data": {
  1011. "type": "string"
  1012. },
  1013. "root": {
  1014. "type": "string"
  1015. },
  1016. "cwd": {
  1017. "type": "string"
  1018. }
  1019. },
  1020. "required": [
  1021. "config",
  1022. "data",
  1023. "root",
  1024. "cwd"
  1025. ]
  1026. },
  1027. "time": {
  1028. "type": "object",
  1029. "properties": {
  1030. "initialized": {
  1031. "type": "number"
  1032. }
  1033. }
  1034. }
  1035. },
  1036. "required": [
  1037. "user",
  1038. "git",
  1039. "path",
  1040. "time"
  1041. ]
  1042. },
  1043. "Provider.Info": {
  1044. "type": "object",
  1045. "properties": {
  1046. "id": {
  1047. "type": "string"
  1048. },
  1049. "name": {
  1050. "type": "string"
  1051. },
  1052. "options": {
  1053. "type": "object",
  1054. "additionalProperties": {}
  1055. },
  1056. "models": {
  1057. "type": "array",
  1058. "items": {
  1059. "$ref": "#/components/schemas/Provider.Model"
  1060. }
  1061. }
  1062. },
  1063. "required": [
  1064. "id",
  1065. "name",
  1066. "models"
  1067. ]
  1068. },
  1069. "Provider.Model": {
  1070. "type": "object",
  1071. "properties": {
  1072. "id": {
  1073. "type": "string"
  1074. },
  1075. "name": {
  1076. "type": "string"
  1077. },
  1078. "cost": {
  1079. "type": "object",
  1080. "properties": {
  1081. "input": {
  1082. "type": "number"
  1083. },
  1084. "inputCached": {
  1085. "type": "number"
  1086. },
  1087. "output": {
  1088. "type": "number"
  1089. },
  1090. "outputCached": {
  1091. "type": "number"
  1092. }
  1093. },
  1094. "required": [
  1095. "input",
  1096. "inputCached",
  1097. "output",
  1098. "outputCached"
  1099. ]
  1100. },
  1101. "contextWindow": {
  1102. "type": "number"
  1103. },
  1104. "maxOutputTokens": {
  1105. "type": "number"
  1106. },
  1107. "attachment": {
  1108. "type": "boolean"
  1109. },
  1110. "reasoning": {
  1111. "type": "boolean"
  1112. }
  1113. },
  1114. "required": [
  1115. "id",
  1116. "cost",
  1117. "contextWindow",
  1118. "attachment"
  1119. ]
  1120. }
  1121. }
  1122. }
  1123. }