Skip to content

Commit 9610c3c

Browse files
committed
Merge main into fix/anthropic-tool-result-order
2 parents 91efdbd + 5e79a81 commit 9610c3c

45 files changed

Lines changed: 584 additions & 196 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ Install and run a OGX server:
6060
curl -LsSf https://github.com/ogx-ai/ogx/raw/main/scripts/install.sh | bash
6161

6262
# Or install via uv
63-
uv pip install ogx[starter]
63+
uv pip install ogx
6464

65-
# Start the server (uses the starter distribution with Ollama)
66-
uv run ogx run starter
65+
# Start the server (auto-detects providers from the environment)
66+
uv run ogx go
6767
```
6868

6969
Then connect with any OpenAI, Anthropic, or Google GenAI client — [Python](https://github.com/openai/openai-python), [TypeScript](https://github.com/openai/openai-node), [curl](https://platform.openai.com/docs/api-reference), or any framework that speaks these APIs.

docs/docs/getting_started/quickstart.mdx

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,15 @@ Install [Ollama](https://ollama.com/download), then pull a model and start the s
1919

2020
```bash
2121
ollama pull llama3.2:3b
22-
export OLLAMA_URL=http://localhost:11434/v1
23-
uvx --from 'ogx[starter]' ogx run starter
22+
uvx ogx go
2423
```
2524

2625
</TabItem>
2726
<TabItem value="openai" label="OpenAI">
2827

2928
```bash
3029
export OPENAI_API_KEY=sk-xxx
31-
uvx --from 'ogx[starter]' ogx run starter
30+
uvx ogx go
3231
```
3332

3433
</TabItem>
@@ -52,13 +51,14 @@ The `uvx` command above is great for trying things out. For a real project, inst
5251

5352
```bash
5453
uv init my-ai-app && cd my-ai-app
55-
uv add 'ogx[starter]' openai
56-
export OLLAMA_URL=http://localhost:11434/v1
57-
uv run ogx run starter
54+
uv add ogx openai
55+
uv run ogx go
5856
```
5957
:::
6058

61-
The server is now running at `http://localhost:8321`. You can use any OpenAI-compatible client.
59+
The server is now running at `https://localhost:8321`. You can use any OpenAI-compatible client.
60+
61+
OGX is secure by default and listens on https. Passing `--insecure` forces the server to listen on http.
6262

6363
## Verify it works
6464

@@ -68,16 +68,17 @@ Before writing any code, confirm the server is healthy and models are registered
6868
<TabItem value="curl" label="curl" default>
6969

7070
```bash
71-
curl -s http://localhost:8321/v1/models | python -m json.tool
71+
curl -k -s https://localhost:8321/v1/models | python -m json.tool
7272
```
7373

7474
</TabItem>
7575
<TabItem value="python" label="Python">
7676

7777
```python
78+
import httpx
7879
from openai import OpenAI
7980

80-
client = OpenAI(base_url="http://localhost:8321/v1", api_key="fake")
81+
client = OpenAI(base_url="http://localhost:8321/v1", api_key="fake", http_client=httpx.Client(verify=False))
8182

8283
for model in client.models.list():
8384
print(model.id)
@@ -108,9 +109,10 @@ If the list is empty or the command fails, check the [Troubleshooting](#troubles
108109
Open a new terminal and run:
109110

110111
```python title="app.py"
112+
import httpx
111113
from openai import OpenAI
112114

113-
client = OpenAI(base_url="http://localhost:8321/v1", api_key="fake")
115+
client = OpenAI(base_url="https://localhost:8321/v1", api_key="fake", http_client=httpx.Client(verify=False))
114116

115117
response = client.responses.create(
116118
model="ollama/llama3.2:3b",
@@ -128,9 +130,10 @@ pip install openai && python app.py
128130
Upload a file, create a vector store, and ask questions about it:
129131

130132
```python
133+
import httpx
131134
from openai import OpenAI
132135

133-
client = OpenAI(base_url="http://localhost:8321/v1", api_key="fake")
136+
client = OpenAI(base_url="http://localhost:8321/v1", api_key="fake", http_client=httpx.Client(verify=False))
134137

135138
# Upload a document
136139
file = client.files.create(
@@ -166,7 +169,7 @@ That's it. Same OpenAI SDK, local model, your own vector store.
166169
If you see `Address already in use`, another process is using port 8321. Either stop it or run on a different port:
167170

168171
```bash
169-
uvx --from 'ogx[starter]' ogx run starter --port 8322
172+
uvx ogx go --port 8322
170173
```
171174

172175
</details>

docs/docs/index.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,13 @@ curl -LsSf https://github.com/ogx-ai/ogx/raw/main/scripts/install.sh | bash
113113
pip install ogx
114114

115115
# Start the server
116-
ogx stack run
116+
uv run ogx go --insecure
117117
```
118118

119119
:::tip
120120
OGX works with any OpenAI-compatible client. Point your existing code at `http://localhost:8321/v1` and you're ready to go.
121+
122+
OGX is secure by default. `--insecure` forces the server to listen on http. By default it runs on https with a self-signed cert. You'll have to skip cert verification or trust the automatically generated cert.
121123
:::
122124

123125
[Quick Start Guide](/docs/getting_started/quickstart) | [OpenAI API Compatibility](./api-openai) | [GitHub](https://github.com/ogx-ai/ogx)

docs/docs/providers/inference/remote_anthropic.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ Anthropic inference provider for accessing Claude models and Anthropic's AI serv
3434
| `network.timeout.connect` | `float \| None` | No | | Connection timeout in seconds. |
3535
| `network.timeout.read` | `float \| None` | No | | Read timeout in seconds. |
3636
| `network.headers` | `dict[str, str] \| None` | No | | Additional HTTP headers to include in all requests. |
37+
| `network.limits` | `LimitsConfig \| None` | No | | HTTP connection pool limits (max connections, keepalive connections, keepalive expiry). None uses httpx's own defaults. |
38+
| `network.limits.max_connections` | `int \| None` | No | 100 | Maximum number of concurrent connections in the pool. None means no limit. Values must be >= 1 if set. |
39+
| `network.limits.max_keepalive_connections` | `int \| None` | No | 20 | Maximum number of idle keep-alive connections to retain. None means no limit. Values must be >= 0 if set. |
40+
| `network.limits.keepalive_expiry` | `float \| None` | No | 5.0 | Time in seconds to keep idle keep-alive connections open before closing them. None means no expiry. Values must be >= 0 if set. |
3741

3842
## Sample Configuration
3943

docs/docs/providers/inference/remote_azure.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ https://learn.microsoft.com/en-us/azure/ai-foundry/openai/overview
4141
| `network.timeout.connect` | `float \| None` | No | | Connection timeout in seconds. |
4242
| `network.timeout.read` | `float \| None` | No | | Read timeout in seconds. |
4343
| `network.headers` | `dict[str, str] \| None` | No | | Additional HTTP headers to include in all requests. |
44+
| `network.limits` | `LimitsConfig \| None` | No | | HTTP connection pool limits (max connections, keepalive connections, keepalive expiry). None uses httpx's own defaults. |
45+
| `network.limits.max_connections` | `int \| None` | No | 100 | Maximum number of concurrent connections in the pool. None means no limit. Values must be >= 1 if set. |
46+
| `network.limits.max_keepalive_connections` | `int \| None` | No | 20 | Maximum number of idle keep-alive connections to retain. None means no limit. Values must be >= 0 if set. |
47+
| `network.limits.keepalive_expiry` | `float \| None` | No | 5.0 | Time in seconds to keep idle keep-alive connections open before closing them. None means no expiry. Values must be >= 0 if set. |
4448
| `base_url` | `HttpUrl \| None` | No | | Azure API base for Azure (e.g., https://your-resource-name.openai.azure.com/openai/v1) |
4549
| `api_version` | `str \| None` | No | | Azure API version for Azure (e.g., 2024-12-01-preview) |
4650
| `api_type` | `str \| None` | No | azure | Azure API type for Azure (e.g., azure) |

docs/docs/providers/inference/remote_bedrock.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ AWS Bedrock inference provider for the OpenAI-compatible runtime, with AWS crede
3434
| `network.timeout.connect` | `float \| None` | No | | Connection timeout in seconds. |
3535
| `network.timeout.read` | `float \| None` | No | | Read timeout in seconds. |
3636
| `network.headers` | `dict[str, str] \| None` | No | | Additional HTTP headers to include in all requests. |
37+
| `network.limits` | `LimitsConfig \| None` | No | | HTTP connection pool limits (max connections, keepalive connections, keepalive expiry). None uses httpx's own defaults. |
38+
| `network.limits.max_connections` | `int \| None` | No | 100 | Maximum number of concurrent connections in the pool. None means no limit. Values must be >= 1 if set. |
39+
| `network.limits.max_keepalive_connections` | `int \| None` | No | 20 | Maximum number of idle keep-alive connections to retain. None means no limit. Values must be >= 0 if set. |
40+
| `network.limits.keepalive_expiry` | `float \| None` | No | 5.0 | Time in seconds to keep idle keep-alive connections open before closing them. None means no expiry. Values must be >= 0 if set. |
3741
| `aws_access_key_id` | `SecretStr \| None` | No | | The AWS access key to use. Default use environment variable: AWS_ACCESS_KEY_ID |
3842
| `aws_secret_access_key` | `SecretStr \| None` | No | | The AWS secret access key to use. Default use environment variable: AWS_SECRET_ACCESS_KEY |
3943
| `aws_session_token` | `SecretStr \| None` | No | | The AWS session token to use. Default use environment variable: AWS_SESSION_TOKEN |

docs/docs/providers/inference/remote_cerebras.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ Cerebras inference provider for running models on Cerebras Cloud platform.
3434
| `network.timeout.connect` | `float \| None` | No | | Connection timeout in seconds. |
3535
| `network.timeout.read` | `float \| None` | No | | Read timeout in seconds. |
3636
| `network.headers` | `dict[str, str] \| None` | No | | Additional HTTP headers to include in all requests. |
37+
| `network.limits` | `LimitsConfig \| None` | No | | HTTP connection pool limits (max connections, keepalive connections, keepalive expiry). None uses httpx's own defaults. |
38+
| `network.limits.max_connections` | `int \| None` | No | 100 | Maximum number of concurrent connections in the pool. None means no limit. Values must be >= 1 if set. |
39+
| `network.limits.max_keepalive_connections` | `int \| None` | No | 20 | Maximum number of idle keep-alive connections to retain. None means no limit. Values must be >= 0 if set. |
40+
| `network.limits.keepalive_expiry` | `float \| None` | No | 5.0 | Time in seconds to keep idle keep-alive connections open before closing them. None means no expiry. Values must be >= 0 if set. |
3741
| `base_url` | `HttpUrl \| None` | No | https://api.cerebras.ai/v1 | Base URL for the Cerebras API |
3842

3943
## Sample Configuration

docs/docs/providers/inference/remote_databricks.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ Databricks inference provider for running models on Databricks' unified analytic
3434
| `network.timeout.connect` | `float \| None` | No | | Connection timeout in seconds. |
3535
| `network.timeout.read` | `float \| None` | No | | Read timeout in seconds. |
3636
| `network.headers` | `dict[str, str] \| None` | No | | Additional HTTP headers to include in all requests. |
37+
| `network.limits` | `LimitsConfig \| None` | No | | HTTP connection pool limits (max connections, keepalive connections, keepalive expiry). None uses httpx's own defaults. |
38+
| `network.limits.max_connections` | `int \| None` | No | 100 | Maximum number of concurrent connections in the pool. None means no limit. Values must be >= 1 if set. |
39+
| `network.limits.max_keepalive_connections` | `int \| None` | No | 20 | Maximum number of idle keep-alive connections to retain. None means no limit. Values must be >= 0 if set. |
40+
| `network.limits.keepalive_expiry` | `float \| None` | No | 5.0 | Time in seconds to keep idle keep-alive connections open before closing them. None means no expiry. Values must be >= 0 if set. |
3741
| `base_url` | `HttpUrl \| None` | No | | The URL for the Databricks model serving endpoint (should include /serving-endpoints path) |
3842

3943
## Sample Configuration

docs/docs/providers/inference/remote_deepseek.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ DeepSeek inference provider for accessing DeepSeek models via the DeepSeek API.
3434
| `network.timeout.connect` | `float \| None` | No | | Connection timeout in seconds. |
3535
| `network.timeout.read` | `float \| None` | No | | Read timeout in seconds. |
3636
| `network.headers` | `dict[str, str] \| None` | No | | Additional HTTP headers to include in all requests. |
37+
| `network.limits` | `LimitsConfig \| None` | No | | HTTP connection pool limits (max connections, keepalive connections, keepalive expiry). None uses httpx's own defaults. |
38+
| `network.limits.max_connections` | `int \| None` | No | 100 | Maximum number of concurrent connections in the pool. None means no limit. Values must be >= 1 if set. |
39+
| `network.limits.max_keepalive_connections` | `int \| None` | No | 20 | Maximum number of idle keep-alive connections to retain. None means no limit. Values must be >= 0 if set. |
40+
| `network.limits.keepalive_expiry` | `float \| None` | No | 5.0 | Time in seconds to keep idle keep-alive connections open before closing them. None means no expiry. Values must be >= 0 if set. |
3741
| `base_url` | `HttpUrl \| None` | No | https://api.deepseek.com/v1 | Base URL for the DeepSeek API |
3842

3943
## Sample Configuration

docs/docs/providers/inference/remote_fireworks.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ Fireworks AI inference provider for Llama models and other AI models on the Fire
3434
| `network.timeout.connect` | `float \| None` | No | | Connection timeout in seconds. |
3535
| `network.timeout.read` | `float \| None` | No | | Read timeout in seconds. |
3636
| `network.headers` | `dict[str, str] \| None` | No | | Additional HTTP headers to include in all requests. |
37+
| `network.limits` | `LimitsConfig \| None` | No | | HTTP connection pool limits (max connections, keepalive connections, keepalive expiry). None uses httpx's own defaults. |
38+
| `network.limits.max_connections` | `int \| None` | No | 100 | Maximum number of concurrent connections in the pool. None means no limit. Values must be >= 1 if set. |
39+
| `network.limits.max_keepalive_connections` | `int \| None` | No | 20 | Maximum number of idle keep-alive connections to retain. None means no limit. Values must be >= 0 if set. |
40+
| `network.limits.keepalive_expiry` | `float \| None` | No | 5.0 | Time in seconds to keep idle keep-alive connections open before closing them. None means no expiry. Values must be >= 0 if set. |
3741
| `base_url` | `HttpUrl \| None` | No | https://api.fireworks.ai/inference/v1 | The URL for the Fireworks server |
3842

3943
## Sample Configuration

0 commit comments

Comments
 (0)