From 5b8a93b1129e7825a4a815b14d82ba1fd34ca205 Mon Sep 17 00:00:00 2001 From: akshaydeo Date: Tue, 16 Dec 2025 15:57:57 +0530 Subject: [PATCH] sdks using stainless --- .stainless/stainless.yml | 222 ++++++++++++++++++++++++++++++++++++++ .stainless/workspace.json | 22 ++++ sdks/go | 1 + sdks/kotlin | 1 + sdks/python | 1 + sdks/ruby | 1 + sdks/typescript | 1 + 7 files changed, 249 insertions(+) create mode 100644 .stainless/stainless.yml create mode 100644 .stainless/workspace.json create mode 160000 sdks/go create mode 160000 sdks/kotlin create mode 160000 sdks/python create mode 160000 sdks/ruby create mode 160000 sdks/typescript diff --git a/.stainless/stainless.yml b/.stainless/stainless.yml new file mode 100644 index 000000000..9cffb02d7 --- /dev/null +++ b/.stainless/stainless.yml @@ -0,0 +1,222 @@ +# yaml-language-server: $schema=https://app.stainless.com/config.schema.json + +# The main edition for the config, see the [docs] for more information. +# +# [docs]: https://www.stainless.com/docs/reference/editions +edition: 2025-10-10 + +organization: + # Name of your organization or company, used to determine the name of the client + # and headings. + name: bifrost + # Link to your API documentation. + docs: https://github.com/maximhq/bifrost + # Contact email for bug reports, questions, and support requests. + contact: '' + +# `targets` define the output targets and their customization options, such as +# whether to emit the Node SDK and what its package name should be. +targets: + typescript: + # The edition for this target, see the [docs] for more information. + # + # [docs]: https://www.stainless.com/docs/reference/editions + edition: typescript.2025-10-10 + package_name: bifrost + production_repo: null + publish: + npm: false + python: + edition: python.2025-11-20 + package_name: bifrost + production_repo: null + publish: + pypi: false + go: + edition: go.2025-10-08 + package_name: bifrost + production_repo: null + options: + enable_v2: true + kotlin: + edition: kotlin.2025-10-08 + reverse_domain: com.bifrost.api + production_repo: null + publish: + maven: false + ruby: + edition: ruby.2025-10-08 + gem_name: bifrost + production_repo: null + publish: + rubygems: false + +# `environments` are a map of the name of the environment (e.g. "sandbox", +# "production") to the corresponding url to use. +environments: + production: http://localhost:8080 + +# `resources` define the structure and organization for your API, such as how +# methods and models are grouped together and accessed. See the [configuration +# guide] for more information. +# +# [configuration guide]: https://www.stainless.com/docs/guides/configure#resources +resources: + chat: + # Subresources define resources that are nested within another for more powerful + # logical groupings, e.g. `cards.payments`. + subresources: + completions: + # Configure the methods defined in this resource. Each key in the object is the + # name of the method and the value is either an endpoint (for example, `get /foo`) + # or an object with more detail. + # + # [reference]: https://www.stainless.com/docs/reference/config#method + # Configure the models--named types--defined in the resource. Each key in the + # object is the name of the model and the value is either the name of a schema in + # `#/components/schemas` or an object with more detail. + # + # [reference]: https://www.stainless.com/docs/reference/config#model + models: + chat_completion_request: '#/components/schemas/ChatCompletionRequest' + bifrost_response: '#/components/schemas/BifrostResponse' + log_prob: '#/components/schemas/LogProb' + methods: + create: post /v1/chat/completions + create_litellm: post /chat/completions + + text: + methods: + create_completion: post /v1/text/completions + + mcp: + subresources: + tool: + models: + bifrost_message: '#/components/schemas/BifrostMessage' + tool_call: '#/components/schemas/ToolCall' + methods: + execute: post /v1/mcp/tool/execute + + audio: + methods: + create_speech: post /v1/audio/speech + create_transcription: post /v1/audio/transcriptions + + openai: + subresources: + v1: + subresources: + audio: + methods: + create_speech: post /openai/v1/audio/speech + create_transcription: post /openai/v1/audio/transcriptions + audio: + methods: + create_speech: post /openai/audio/speech + create_transcription: post /openai/audio/transcriptions + chat: + methods: + create_completion: post /openai/chat/completions + + api: + subresources: + mcp: + methods: + list_clients: get /api/mcp/clients + subresources: + client: + models: + mcp_client_config: '#/components/schemas/MCPClientConfig' + success_response: '#/components/schemas/SuccessResponse' + methods: + create: post /api/mcp/client + update_tools: put /api/mcp/client/{name} + delete: delete /api/mcp/client/{name} + reconnect: post /api/mcp/client/{name}/reconnect + providers: + models: + model_provider: '#/components/schemas/ModelProvider' + provider_response: '#/components/schemas/ProviderResponse' + key: '#/components/schemas/Key' + network_config: '#/components/schemas/NetworkConfig' + concurrency_and_buffer_size: '#/components/schemas/ConcurrencyAndBufferSize' + proxy_config: '#/components/schemas/ProxyConfig' + methods: + list_providers: get /api/providers + create: post /api/providers + retrieve: get /api/providers/{provider} + update: put /api/providers/{provider} + delete: delete /api/providers/{provider} + config: + models: + client_config: '#/components/schemas/ClientConfig' + methods: + retrieve: get /api/config + update: put /api/config + logs: + methods: + retrieve: get /api/logs + list_dropped_requests: get /api/logs/dropped + + ws: + methods: + stream_logs: get /ws/logs + + anthropic: + subresources: + v1: + methods: + send_message: post /anthropic/v1/messages + + genai: + subresources: + v1beta: + methods: + create_completion: post /genai/v1beta/models/{model} + + metrics: + methods: + retrieve: get /metrics + +settings: + # All generated integration tests that hit the prism mock http server are marked + # as skipped. Removing this setting or setting it to false enables tests, but + # doing so may result in test failures due to bugs in the test server. + # + # [prism mock http server]: https://stoplight.io/open-source/prism + disable_mock_tests: true + license: MIT + +# `client_settings` define settings for the API client, such as extra constructor +# arguments (used for authentication), retry behavior, idempotency, etc. +client_settings: + opts: + api_key: + type: string + read_env: BIFROST_API_KEY + nullable: true + auth: + security_scheme: bearerAuth + +security_schemes: + bearerAuth: + type: http + scheme: bearer + +security: + - bearerAuth: [] + +# `readme` is used to configure the code snippets that will be rendered in the +# README.md of various SDKs. In particular, you can change the `headline` +# snippet's endpoint and the arguments to call it with. +readme: + example_requests: + default: + type: request + endpoint: post /v1/chat/completions + params: {} + headline: + type: request + endpoint: post /v1/chat/completions + params: {} diff --git a/.stainless/workspace.json b/.stainless/workspace.json new file mode 100644 index 000000000..7cff7c7bc --- /dev/null +++ b/.stainless/workspace.json @@ -0,0 +1,22 @@ +{ + "project": "bifrost", + "openapi_spec": "../docs/apis/openapi.json", + "stainless_config": "stainless.yml", + "targets": { + "go": { + "output_path": "../sdks/go" + }, + "kotlin": { + "output_path": "../sdks/kotlin" + }, + "python": { + "output_path": "../sdks/python" + }, + "ruby": { + "output_path": "../sdks/ruby" + }, + "typescript": { + "output_path": "../sdks/typescript" + } + } +} diff --git a/sdks/go b/sdks/go new file mode 160000 index 000000000..980079043 --- /dev/null +++ b/sdks/go @@ -0,0 +1 @@ +Subproject commit 9800790435bee68234f4f0d19d6d8c8e7dc3ea74 diff --git a/sdks/kotlin b/sdks/kotlin new file mode 160000 index 000000000..558eea627 --- /dev/null +++ b/sdks/kotlin @@ -0,0 +1 @@ +Subproject commit 558eea627cb34dc03a218ca87aa3752240b45167 diff --git a/sdks/python b/sdks/python new file mode 160000 index 000000000..01d8ec173 --- /dev/null +++ b/sdks/python @@ -0,0 +1 @@ +Subproject commit 01d8ec1738bc4b38db445e55282af2619597d0ab diff --git a/sdks/ruby b/sdks/ruby new file mode 160000 index 000000000..8c6d29d90 --- /dev/null +++ b/sdks/ruby @@ -0,0 +1 @@ +Subproject commit 8c6d29d9069a37bc94d812fc9dae394047090376 diff --git a/sdks/typescript b/sdks/typescript new file mode 160000 index 000000000..0d667bb20 --- /dev/null +++ b/sdks/typescript @@ -0,0 +1 @@ +Subproject commit 0d667bb2059f140adb5539189838582b7f6dc15f