### Install and Manage Osorus Plugins Source: https://github.com/osaurus-ai/osaurus/blob/main/README.md Use the Osorus CLI to install, list, create, and develop plugins. Ensure you have the Osorus CLI installed. ```bash osaurus tools install osaurus.browser # Install from registry osaurus tools list # List installed osaurus tools create MyPlugin --swift # Create a plugin osaurus tools dev com.acme.my-plugin # Dev with hot reload ``` -------------------------------- ### Install Plugin Locally Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/plugins/PACKAGING.md Installs a plugin from a local zip file. This unpacks the plugin, generates a receipt, and updates the current symlink. ```bash osaurus tools install ./my-plugin-0.1.0.zip ``` -------------------------------- ### Swift Plugin Entry Point Example Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/plugins/DEBUGGING.md Example of how to define the plugin entry point in Swift. Ensure the function is exported with `_cdecl` and named correctly. ```swift @_cdecl("osaurus_plugin_entry_v2") public func osaurus_plugin_entry_v2(api: UnsafeMutableRawPointer) -> UnsafeMutableRawPointer? { return nil } ``` -------------------------------- ### Example Plugin ID Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/CLAUDE_PLUGINS.md An example illustrating how a specific plugin maps to the standard plugin ID format. ```text github:anthropics/claude-for-legal/commercial-legal ``` -------------------------------- ### Plugin Tool Run Command Example Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/SANDBOX.md Example of a 'run' command within a plugin tool specification. This command is executed as the agent's Linux user within the plugin's directory. ```shell cd $HOME/plugins/python-data-tools && python3 -c "import pandas as pd; df = pd.read_csv('$PARAM_FILE'); print(df.describe().to_string())" ``` -------------------------------- ### Install and Install Git Hooks with lefthook Source: https://github.com/osaurus-ai/osaurus/blob/main/README.md Installs the lefthook tool using Homebrew and then sets up the git hooks for the project. This typically includes a pre-push hook to ensure code quality. ```bash brew install lefthook lefthook install ``` -------------------------------- ### Example receipt.json Structure Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/plugins/PACKAGING.md This is an example of the receipt.json file generated by Osaurus after a plugin is installed. It contains metadata about the installation and the plugin artifact. ```json { "plugin_id": "dev.example.MyPlugin", "version": "0.1.0", "installed_at": "2026-05-08T17:42:01Z", "dylib_filename": "MyPlugin.dylib", "dylib_sha256": "sha256-...", "platform": "macOS", "arch": "arm64", "public_keys": {...}, "artifact": { "url": "...", "sha256": "...", "minisign": null, "size": 12345 } } ``` -------------------------------- ### Python Client Example Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/OpenAI_API_GUIDE.md Example of using the OpenAI Python library with Osorus. ```python from openai import OpenAI # Point to your local Osorus server client = OpenAI( base_url="http://127.0.0.1:1337/v1", # Use /v1 for OpenAI client compatibility api_key="not-needed" # Osorus doesn't require authentication ) # List available models models = client.models.list() for model in models.data: print(model.id) # Create a chat completion response = client.chat.completions.create( model="llama-3.2-3b-instruct", messages=[ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is the capital of France?"} ], temperature=0.7, max_tokens=100 ) print(response.choices[0].message.content) ``` -------------------------------- ### Rust Plugin Entry Point Example Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/plugins/DEBUGGING.md Example of how to define the plugin entry point in Rust. Ensure the function is declared as `extern "C"` and named correctly. ```rust pub extern "C" fn osaurus_plugin_entry_v2(api: *mut std::os::raw::c_void) -> *mut std::os::raw::c_void { std::ptr::null_mut() } ``` -------------------------------- ### Route Path Syntax Examples Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/plugins/ROUTES_AND_WEB.md Illustrates different pattern matching syntaxes for route paths, including exact matches, path parameters, and wildcard suffixes. ```markdown | Pattern | |---|---| | Exact | | `:name` | | `*` suffix | ``` ```markdown | Matches | |---|---| | only the literal path | | one segment, captured as a path parameter | | zero or more trailing segments | ``` ```markdown | Example | |---|---| | `/items` matches `/items` | | `/items/:id` matches `/items/42` with `path_params.id == "42"` | | `/files/*` matches `/files`, `/files/a`, `/files/a/b` | ``` -------------------------------- ### Tool Namespacing Example Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/REMOTE_MCP_PROVIDERS.md Demonstrates how tools from remote MCP providers are prefixed with the provider name to prevent naming conflicts. ```text provider_toolname ``` ```text linear_search_issues ``` -------------------------------- ### Serve Ollama on Network Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/REMOTE_PROVIDERS.md Use this command to expose your local Ollama instance to the network. Ensure Ollama is installed and running. ```bash OLLAMA_HOST=0.0.0.0:11434 ollama serve ``` -------------------------------- ### Check Prerequisites Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/plugins/QUICKSTART.md Verify that Osaurus and the required language toolchains are installed and accessible. ```bash osaurus --version swift --version # or: cargo --version ``` -------------------------------- ### Unit Test Plugin with MockHost Source: https://github.com/osaurus-ai/osaurus/blob/main/Packages/OsaurusPluginTestKit/README.md Instantiate MockHost, configure its behavior, install it using `withInstalled`, initialize the plugin, drive a lifecycle event, and assert against recorders. Ensure to destroy the plugin context afterwards. ```swift import OsaurusPluginTestKit import Testing @testable import MyPlugin // the Swift module in your plugin's main target struct MyPluginConfigTests { @Test func setupWebhookOnTunnelChange() { let host = MockHost() let agentId = UUID().uuidString host.activeAgentId = agentId host.onConfigGet = { key in switch key { case "bot_token": return "TEST_TOKEN" default: return nil } } // Stub the plugin's outbound HTTP so it doesn't hit Telegram // for real during the test. host.onHttpRequest = { _ in #"{"status":200,"body":"{"ok":true}","body_encoding":"utf8"}"# } host.withInstalled { hostAPI in // 1. Initialize the plugin against the mock host. Wire- // up shape mirrors what the real loader does. let ctx = MyPlugin.osaurus_init(hostAPI: hostAPI) // 2. Drive the lifecycle event you care about. "https://0xagentX.agent.osaurus.ai".withCString { val in "tunnel_url".withCString { key in MyPlugin.on_config_changed(ctx, key, val) } } // 3. Assert. #expect(host.configWrites.lastValue(forKey: "webhook_secret") != nil) #expect(host.logs.contains("Webhook registered")) MyPlugin.osaurus_destroy(ctx) } } } ``` -------------------------------- ### Skill File Format Example (Markdown) Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/SKILLS.md This is an example of a skill file in Markdown format, adhering to the Agent Skills specification with YAML frontmatter. It defines the skill's metadata, instructions, methodology, and output format. ```markdown --- name: Research Analyst description: Structured research with source evaluation category: Research version: 1.0.0 author: Your Name --- # Research Analyst You are a research analyst specializing in thorough, well-sourced research. ## Methodology 1. Understand the research question 2. Identify reliable sources 3. Evaluate source credibility 4. Synthesize findings 5. Present with citations ## Output Format Always include: - Executive summary - Key findings - Source citations - Confidence assessment ``` -------------------------------- ### Start and Manage Osorus Server Source: https://github.com/osaurus-ai/osaurus/blob/main/README.md Control the Osorus server using the CLI. Start the server on a specific port, expose it on your local network, open the UI, check its status, or stop it. ```bash osaurus serve --port 1337 # Start on localhost osaurus serve --port 1337 --expose # Expose on LAN osaurus ui # Open the chat UI osaurus status # Check status osaurus stop # Stop the server ``` -------------------------------- ### Development Mode Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/plugins/PACKAGING.md Enables a tight development loop by automatically building, installing, and watching source files for changes. ```bash osaurus tools dev ``` -------------------------------- ### Osaurus Server Starting Configuration Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/SHARED_CONFIGURATION_GUIDE.md This JSON represents the minimal metadata published by an Osaurus server when it is in the 'starting' state. It includes a unique instance ID, the last update timestamp, and the current health status. ```json { "instanceId": "f26f8b59-2b64-4c57-8c5a-5a1ce9f9b4a8", "updatedAt": "2025-09-08T12:34:56Z", "health": "starting" } ``` -------------------------------- ### List Installed Plugins Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/plugins/QUICKSTART.md Check if your plugin is recognized by Osaurus. Useful for troubleshooting 'Plugin not found' errors. ```bash osaurus tools list ``` -------------------------------- ### Tool Execution Loop with Python SDK Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/OpenAI_API_GUIDE.md Provides a Python example demonstrating the client-side execution of tool calls and how to send results back to the model. ```APIDOC ## Client-side Tool Execution ### Description This example shows how to use the OpenAI Python client to interact with the Osaurus API, execute tool calls received from the model, and continue the conversation with the results. ### Language Python ### Code Example ```python import json from openai import OpenAI client = OpenAI(base_url="http://127.0.0.1:1337/v1", api_key="osaurus") tools = [{ "type": "function", "function": { "name": "get_weather", "parameters": { "type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"], } } }] resp = client.chat.completions.create( model="llama-3.2-3b-instruct", messages=[{"role": "user", "content": "Weather in SF?"}], tools=tools, tool_choice="auto", ) tool_calls = resp.choices[0].message.tool_calls or [] for call in tool_calls: args = json.loads(call.function.arguments) # Execute your function (e.g., call a weather API) # This is a placeholder for actual function execution result = {"tempC": 18, "conditions": "Foggy"} # Continue the conversation with the tool result followup = client.chat.completions.create( model="llama-3.2-3b-instruct", messages=[ {"role": "user", "content": "Weather in SF?"}, # Include the original assistant message with tool calls {"role": "assistant", "content": "", "tool_calls": tool_calls}, # Add the tool result as a 'tool' role message {"role": "tool", "tool_call_id": call.id, "content": json.dumps(result)} ] ) print(f"Answer: {followup.choices[0].message.content}") ``` ### Explanation 1. **Initialize Client**: Sets up the `OpenAI` client with the custom `base_url` and `api_key` for Osaurus. 2. **Define Tools**: Specifies the available tools, including their names, descriptions, and parameters. 3. **First Completion**: Makes an initial request to `/v1/chat/completions` with the user's message and the defined tools. 4. **Process Tool Calls**: If the response contains `tool_calls`, it iterates through them. 5. **Execute Function**: Parses the arguments and simulates executing the tool function (in a real scenario, this would involve calling an actual API or function). 6. **Second Completion**: Makes a subsequent request, including the original user message, the assistant's previous response (with `tool_calls`), and a new message with `role: "tool"` containing the `tool_call_id` and the execution `content` (the result of the tool function). ``` -------------------------------- ### Route Declaration in Manifest Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/plugins/ROUTES_AND_WEB.md Example of how to declare routes in the plugin's manifest file. This includes route ID, path, allowed HTTP methods, description, and authentication level. ```APIDOC ## Declaring routes In your manifest: ```json "capabilities": { "routes": [ { "id": "callback", "path": "/oauth/callback", "methods": ["GET"], "description": "OAuth redirect handler", "auth": "none", "tunnel_exposed": true }, { "id": "create_item", "path": "/items", "methods": ["POST"], "auth": "owner" }, { "id": "get_item", "path": "/items/:id", "methods": ["GET"], "auth": "owner" } ] } ``` `tunnel_exposed` is **opt-in** (default `false`). See [Tunnel exposure](#tunnel-exposure) below. Path syntax: | Pattern | |---|---| | Exact | only the literal path | `/items` matches `/items` | | `:name` | one segment, captured as a path parameter | `/items/:id` matches `/items/42` with `path_params.id == "42"` | | `*` suffix | zero or more trailing segments | `/files/*` matches `/files`, `/files/a`, `/files/a/b` | Match precedence: **exact > path-parameter > wildcard**. The first matching route wins within each tier, so define more specific routes first. ``` -------------------------------- ### Configure Osaurus MCP Server Source: https://github.com/osaurus-ai/osaurus/blob/main/README.md Configuration for setting up Osaurus as an MCP server, specifying the command and arguments to start the stdio bridge. ```json { "mcpServers": { "osaurus": { "command": "osaurus", "args": ["mcp"] } } } ``` -------------------------------- ### Writing a Tool with Argument Validation Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/TOOL_CONTRACT.md Example of building a tool's `execute` function using `require…` helpers for argument validation, automatically generating failure envelopes. ```swift func execute(argumentsJSON: String) async throws -> String { let argsReq = requireArgumentsDictionary(argumentsJSON, tool: name) guard case .value(let args) = argsReq else { return argsReq.failureEnvelope ?? "" } let pathReq = requireString( args, "path", expected: "relative path under the agent home", tool: name ) guard case .value(let path) = pathReq else { return pathReq.failureEnvelope ?? "" } // ... do work ... return ToolEnvelope.success(tool: name, result: ["path": path, "size": 123]) } ``` -------------------------------- ### Install Osaurus via Homebrew Source: https://github.com/osaurus-ai/osaurus/blob/main/README.md Use this command to install Osaurus on your macOS system using Homebrew. ```bash brew install --cask osaurus ``` -------------------------------- ### Declare Web UI Capabilities Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/plugins/ROUTES_AND_WEB.md Configure the `web` capability to serve a static directory as a UI. Specify the static directory, entry point, mount path, and authentication. ```json "capabilities": { "web": { "static_dir": "web", "entry": "index.html", "mount": "/ui", "auth": "owner", "api_mount": "/api" } } ``` -------------------------------- ### Local vmlx Swift Example for Multimodal Chat Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/MULTIMODAL_PLUGIN_ENGINE_SPEC.md Demonstrates loading a local model container and processing multimodal input including images, audio, and video for a chat interaction. It shows how to prepare the input, set generation parameters, and stream the output events. ```swift import Foundation import MLXLMCommon let modelURL = URL(fileURLWithPath: "/path/to/local/model") let container = try await loadModelContainer( from: modelURL, using: tokenizerLoader, loadConfiguration: .default ) let imageURL = URL(fileURLWithPath: "/tmp/input.png") let audioURL = URL(fileURLWithPath: "/tmp/question.wav") let videoURL = URL(fileURLWithPath: "/tmp/clip.mp4") let chat: [Chat.Message] = [ .system("Answer briefly. Use tools only when needed."), .user( "Describe the image, summarize the clip, and note anything audible.", images: [.url(imageURL)], videos: [.url(videoURL)], audios: [.url(audioURL)] ), ] let input = UserInput( chat: chat, processing: .init(), tools: nil, additionalContext: [ "enable_thinking": false ] ) let prepared = try await container.prepare(input: input) var params = await container.defaultGenerateParameters( fallback: GenerateParameters(maxTokens: 512) ) let stream = try await container.generate(input: prepared, parameters: params) for await event in stream { switch event { case .chunk(let text): print(text, terminator: "") case .reasoning(let text): // Route to a thinking pane, or ignore if the plugin does not expose it. print("[thinking] \(text)") case .toolCall(let call): // Execute only allowlisted tools, then send a tool-role follow-up. print("tool call: \(call.function.name)") case .info(let info): print("\nstop=\(info.stopReason) generated=\(info.generationTokenCount)") } } ``` -------------------------------- ### Config Get Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/plugins/HOST_API.md Retrieves a configuration value by its key. The returned string must be freed by the caller. ```APIDOC ## config_get(key) ### Description Returns the stored value for a given key, or NULL if the key is not found. The caller is responsible for freeing the returned string using `host->free_string` (v6+) or `libc free` on older hosts. ### Parameters #### Path Parameters - **key** (string) - Required - The key of the configuration value to retrieve. ### Response #### Success Response (string*) - Returns a pointer to a null-terminated string containing the configuration value, or NULL if the key is not found. ### Request Example ```c const char* api_key = host->config_get("api_key"); if (!api_key) { // Handle missing key } else { // Use the api_key if (host->version >= 6 && host->free_string) { host->free_string(api_key); } else { free((void*)api_key); } } ``` ``` -------------------------------- ### Run LiveVoiceAudioSnapshotTests Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/NEMOTRON_OMNI_LIVE_VOICE_PR_CHECKLIST_2026_05_12.md Execute unit tests specifically for Live Voice Audio snapshots. Ensure the toolchain supports this operation. ```bash swift test --filter LiveVoiceAudioSnapshotTests ``` -------------------------------- ### Local Agent Bridge Serialization Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/AGENT_DB.md Bumps the in-flight mutation counter when an agent starts or finishes a write operation. ```swift LocalAgentBridge.serialized ``` -------------------------------- ### Run ServerConfigurationStoreTests Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/MODEL_IDLE_RESIDENCY_SPEC.md Command to execute tests specifically for the ServerConfigurationStore within the OsaurusCore package. Ensure the DEVELOPER_DIR is correctly set. ```bash DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer \ swift test --package-path Packages/OsaurusCore \ --filter ServerConfigurationStoreTests ``` -------------------------------- ### Streaming Response with Tool Calls Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/OpenAI_API_GUIDE.md This example shows the SSE (Server-Sent Events) format for streaming responses that include tool calls. It demonstrates the sequence of deltas for role, tool call ID/type, function name, arguments, and the final `finish_reason`. ```text data: {"id":"chatcmpl-xyz","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"role":"assistant"}}]} data: {"id":"chatcmpl-xyz","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_1","type":"function"}]}}]} data: {"id":"chatcmpl-xyz","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"name":"get_weather"}}]}}]} data: {"id":"chatcmpl-xyz","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"city\":\"SF\"}"}}]}}]} data: {"id":"chatcmpl-xyz","object":"chat.completion.chunk","choices":[{"index":0,"delta":{},"finish_reason":"tool_calls"}]} data: [DONE] ``` -------------------------------- ### Install Provided Key Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/STORAGE.md Replaces the current Keychain entry with a caller-provided key. This is used internally during key rotation to avoid introducing a third key. ```swift install(key:) ``` -------------------------------- ### Plugin JSON Format Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/SANDBOX.md Defines the structure for a Oosaurus AI plugin, including metadata, dependencies, setup commands, files, tools, secrets, and permissions. ```json { "name": "Python Data Tools", "description": "Data analysis toolkit with pandas and matplotlib", "version": "1.0.0", "author": "your-name", "dependencies": ["python3", "py3-pip"], "setup": "pip install --user pandas matplotlib seaborn", "files": { "helpers.py": "import pandas as pd\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\n" }, "tools": [ { "id": "analyze_csv", "description": "Load a CSV file and return summary statistics", "parameters": { "file": { "type": "string", "description": "Path to the CSV file" } }, "run": "cd $HOME/plugins/python-data-tools && python3 -c \"import pandas as pd; df = pd.read_csv('$PARAM_FILE'); print(df.describe().to_string())\"" } ], "secrets": ["OPENAI_API_KEY"], "permissions": { "network": "outbound", "inference": true } } ``` -------------------------------- ### Osaurus Sandbox Architecture Source: https://github.com/osaurus-ai/osaurus/blob/main/README.md Illustrates the architecture of the Osaurus sandbox, showing the connection between the Osaurus host and the Linux VM. ```text ┌────────────────┐ ┌────────────────────────────┐ │ Osaurus │ │ Linux VM (Alpine) │ │ │ │ │ │ Sandbox Mgr ──┼───────┤→ /workspace (VirtioFS) │ │ Host API ←──┼─vsock─┤→ osaurus-host bridge │ │ │ │ │ │ │ │ agent-alice (Linux user) │ │ │ │ agent-bob (Linux user) │ └────────────────┘ └────────────────────────────┘ ``` -------------------------------- ### Minimal Dark Theme Configuration Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/THEMES.md A basic dark theme definition including essential metadata and color definitions. This serves as a starting point for custom themes. ```json { "metadata": { "id": "anything", "name": "My Theme", "version": "1.0", "author": "Your Name", "createdAt": "2026-01-01T00:00:00Z", "updatedAt": "2026-01-01T00:00:00Z" }, "colors": { "primaryText": "#f9fafb", "secondaryText": "#a1a1aa", "tertiaryText": "#8b8b94", "primaryBackground": "#0f0f10", "secondaryBackground": "#18181b", "tertiaryBackground": "#27272a", "sidebarBackground": "#141416", "sidebarSelectedBackground": "#2a2a2e", "accentColor": "#60a5fa", "accentColorLight": "#93c5fd", "primaryBorder": "#3f3f46", "secondaryBorder": "#52525b", "focusBorder": "#60a5fa", "successColor": "#22c55e", "warningColor": "#fbbf24", "errorColor": "#f87171", "infoColor": "#60a5fa", "cardBackground": "#181818", "cardBorder": "#3f3f46", "buttonBackground": "#18181b", "buttonBorder": "#3f3f46", "inputBackground": "#18181b", "inputBorder": "#52525b", "glassTintOverlay": "#00000030", "codeBlockBackground": "#00000059", "shadowColor": "#000000", "selectionColor": "#3b82f680", "cursorColor": "#3b82f6" }, "background": { "type": "solid" }, "glass": { "enabled": true, "material": "hudWindow", "blurRadius": 30, "opacityPrimary": 0.10, "opacitySecondary": 0.08, "opacityTertiary": 0.05, "edgeLight": "#ffffff33", "windowBackingOpacity": 0.55 }, "typography": { "primaryFont": "SF Pro", "monoFont": "SF Mono", "titleSize": 28, "headingSize": 18, "bodySize": 14, "captionSize": 12, "codeSize": 13 }, "animationConfig": { "durationQuick": 0.2, "durationMedium": 0.3, "durationSlow": 0.4, "springResponse": 0.4, "springDamping": 0.8 }, "shadows": { "shadowOpacity": 0.3, "cardShadowRadius": 12, "cardShadowRadiusHover": 20, "cardShadowY": 4, "cardShadowYHover": 8 }, "isBuiltIn": false, "isDark": true } ``` -------------------------------- ### Example Non-Streaming Response Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/OpenAI_API_GUIDE.md A simplified JSON response from the chat completions endpoint when tool calls are made. The `tool_calls` object contains the function name and arguments to be executed. ```json { "id": "chatcmpl-abc123", "object": "chat.completion", "created": 1738193123, "model": "llama-3.2-3b-instruct", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "", "tool_calls": [ { "id": "call_1", "type": "function", "function": { "name": "get_weather", "arguments": "{\"city\":\"SF\"}" } } ] }, "finish_reason": "tool_calls" } ] } ``` -------------------------------- ### List Models with OpenAI Python Library Source: https://github.com/osaurus-ai/osaurus/blob/main/docs/OpenAI_API_GUIDE.md Demonstrates how to list available models from a local Osaurus server using the OpenAI Python library. Ensure the `base_url` is set to your Osaurus server's endpoint with `/v1` appended. ```python from openai import OpenAI # Point to your local Osaurus server client = OpenAI( base_url="http://127.0.0.1:1337/v1", # Use /v1 for OpenAI client compatibility api_key="not-needed" # Osaurus doesn't require authentication ) # List available models models = client.models.list() for model in models.data: print(model.id) ```