Skip to content

Commit 26a2ee8

Browse files
authored
Merge branch 'main' into tool-choice
2 parents 09597b6 + 4442b24 commit 26a2ee8

File tree

141 files changed

+19233
-2766
lines changed

Some content is hidden

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

141 files changed

+19233
-2766
lines changed

.github/actions/setup-test-environment/action.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,32 @@ runs:
3939
if: ${{ inputs.setup == 'vllm' && inputs.inference-mode == 'record' }}
4040
uses: ./.github/actions/setup-vllm
4141

42+
- name: Start Postgres service
43+
if: ${{ contains(inputs.setup, 'postgres') }}
44+
shell: bash
45+
run: |
46+
sudo docker rm -f postgres-ci || true
47+
sudo docker run -d --name postgres-ci \
48+
-e POSTGRES_USER=llamastack \
49+
-e POSTGRES_PASSWORD=llamastack \
50+
-e POSTGRES_DB=llamastack \
51+
-p 5432:5432 \
52+
postgres:16
53+
54+
echo "Waiting for Postgres to become ready..."
55+
for i in {1..30}; do
56+
if sudo docker exec postgres-ci pg_isready -U llamastack -d llamastack >/dev/null 2>&1; then
57+
echo "Postgres is ready"
58+
break
59+
fi
60+
if [ "$i" -eq 30 ]; then
61+
echo "Postgres failed to start in time"
62+
sudo docker logs postgres-ci || true
63+
exit 1
64+
fi
65+
sleep 2
66+
done
67+
4268
- name: Build Llama Stack
4369
shell: bash
4470
run: |

.github/workflows/integration-tests.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ jobs:
6666
run-replay-mode-tests:
6767
needs: generate-matrix
6868
runs-on: ubuntu-latest
69-
name: ${{ format('Integration Tests ({0}, {1}, {2}, client={3}, {4})', matrix.client-type, matrix.config.setup, matrix.python-version, matrix.client-version, matrix.config.suite) }}
69+
name: ${{ format('Integration Tests ({0}, {1}, {2}, client={3}, {4})', matrix.client, matrix.config.setup, matrix.python-version, matrix.client-version, matrix.config.suite) }}
7070

7171
strategy:
7272
fail-fast: false
7373
matrix:
74-
client-type: [library, docker, server]
74+
client: [library, docker, server]
7575
# Use Python 3.13 only on nightly schedule (daily latest client test), otherwise use 3.12
7676
python-version: ${{ github.event.schedule == '0 0 * * *' && fromJSON('["3.12", "3.13"]') || fromJSON('["3.12"]') }}
7777
client-version: ${{ (github.event.schedule == '0 0 * * *' || github.event.inputs.test-all-client-versions == 'true') && fromJSON('["published", "latest"]') || fromJSON('["latest"]') }}
@@ -84,6 +84,7 @@ jobs:
8484
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
8585

8686
- name: Setup test environment
87+
if: ${{ matrix.config.allowed_clients == null || contains(matrix.config.allowed_clients, matrix.client) }}
8788
uses: ./.github/actions/setup-test-environment
8889
with:
8990
python-version: ${{ matrix.python-version }}
@@ -93,11 +94,16 @@ jobs:
9394
inference-mode: 'replay'
9495

9596
- name: Run tests
97+
if: ${{ matrix.config.allowed_clients == null || contains(matrix.config.allowed_clients, matrix.client) }}
9698
uses: ./.github/actions/run-and-record-tests
9799
env:
98100
OPENAI_API_KEY: dummy
99101
with:
100-
stack-config: ${{ matrix.client-type == 'library' && 'ci-tests' || matrix.client-type == 'server' && 'server:ci-tests' || 'docker:ci-tests' }}
102+
stack-config: >-
103+
${{ matrix.config.stack_config
104+
|| (matrix.client == 'library' && 'ci-tests')
105+
|| (matrix.client == 'server' && 'server:ci-tests')
106+
|| 'docker:ci-tests' }}
101107
setup: ${{ matrix.config.setup }}
102108
inference-mode: 'replay'
103109
suite: ${{ matrix.config.suite }}

client-sdks/stainless/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,12 @@ resources:
463463
settings:
464464
license: MIT
465465
unwrap_response_fields: [data]
466+
file_header: |
467+
Copyright (c) Meta Platforms, Inc. and affiliates.
468+
All rights reserved.
469+
470+
This source code is licensed under the terms described in the LICENSE file in
471+
the root directory of this source tree.
466472
467473
openapi:
468474
transformations:

client-sdks/stainless/openapi.yml

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ paths:
963963
Optional filter to control which routes are returned. Can be an API level
964964
('v1', 'v1alpha', 'v1beta') to show non-deprecated routes at that level,
965965
or 'deprecated' to show deprecated routes across all levels. If not specified,
966-
returns only non-deprecated v1 routes.
966+
returns all non-deprecated routes.
967967
required: false
968968
schema:
969969
type: string
@@ -2691,7 +2691,8 @@ paths:
26912691
responses:
26922692
'200':
26932693
description: >-
2694-
A VectorStoreFileContentResponse representing the file contents.
2694+
File contents, optionally with embeddings and metadata based on query
2695+
parameters.
26952696
content:
26962697
application/json:
26972698
schema:
@@ -2726,6 +2727,20 @@ paths:
27262727
required: true
27272728
schema:
27282729
type: string
2730+
- name: include_embeddings
2731+
in: query
2732+
description: >-
2733+
Whether to include embedding vectors in the response.
2734+
required: false
2735+
schema:
2736+
$ref: '#/components/schemas/bool'
2737+
- name: include_metadata
2738+
in: query
2739+
description: >-
2740+
Whether to include chunk metadata in the response.
2741+
required: false
2742+
schema:
2743+
$ref: '#/components/schemas/bool'
27292744
deprecated: false
27302745
/v1/vector_stores/{vector_store_id}/search:
27312746
post:
@@ -6779,6 +6794,11 @@ components:
67796794
type: string
67806795
description: >-
67816796
(Optional) System message inserted into the model's context
6797+
max_tool_calls:
6798+
type: integer
6799+
description: >-
6800+
(Optional) Max number of total calls to built-in tools that can be processed
6801+
in a response
67826802
input:
67836803
type: array
67846804
items:
@@ -7139,6 +7159,11 @@ components:
71397159
(Optional) Additional fields to include in the response.
71407160
max_infer_iters:
71417161
type: integer
7162+
max_tool_calls:
7163+
type: integer
7164+
description: >-
7165+
(Optional) Max number of total calls to built-in tools that can be processed
7166+
in a response.
71427167
additionalProperties: false
71437168
required:
71447169
- input
@@ -7224,6 +7249,11 @@ components:
72247249
type: string
72257250
description: >-
72267251
(Optional) System message inserted into the model's context
7252+
max_tool_calls:
7253+
type: integer
7254+
description: >-
7255+
(Optional) Max number of total calls to built-in tools that can be processed
7256+
in a response
72277257
additionalProperties: false
72287258
required:
72297259
- created_at
@@ -10235,6 +10265,8 @@ components:
1023510265
title: VectorStoreFileDeleteResponse
1023610266
description: >-
1023710267
Response from deleting a vector store file.
10268+
bool:
10269+
type: boolean
1023810270
VectorStoreContent:
1023910271
type: object
1024010272
properties:
@@ -10246,6 +10278,26 @@ components:
1024610278
text:
1024710279
type: string
1024810280
description: The actual text content
10281+
embedding:
10282+
type: array
10283+
items:
10284+
type: number
10285+
description: >-
10286+
Optional embedding vector for this content chunk
10287+
chunk_metadata:
10288+
$ref: '#/components/schemas/ChunkMetadata'
10289+
description: Optional chunk metadata
10290+
metadata:
10291+
type: object
10292+
additionalProperties:
10293+
oneOf:
10294+
- type: 'null'
10295+
- type: boolean
10296+
- type: number
10297+
- type: string
10298+
- type: array
10299+
- type: object
10300+
description: Optional user-defined metadata
1024910301
additionalProperties: false
1025010302
required:
1025110303
- type
@@ -10269,6 +10321,7 @@ components:
1026910321
description: Parsed content of the file
1027010322
has_more:
1027110323
type: boolean
10324+
default: false
1027210325
description: >-
1027310326
Indicates if there are more content pages to fetch
1027410327
next_page:

docs/docs/api-deprecated/index.mdx

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: Deprecated APIs
3+
description: Legacy APIs that are being phased out
4+
sidebar_label: Deprecated
5+
sidebar_position: 1
6+
---
7+
8+
# Deprecated APIs
9+
10+
This section contains APIs that are being phased out in favor of newer, more standardized implementations. These APIs are maintained for backward compatibility but are not recommended for new projects.
11+
12+
:::warning Deprecation Notice
13+
These APIs are deprecated and will be removed in future versions. Please migrate to the recommended alternatives listed below.
14+
:::
15+
16+
## Migration Guide
17+
18+
When using deprecated APIs, please refer to the migration guides provided for each API to understand how to transition to the supported alternatives.
19+
20+
## Deprecated API List
21+
22+
### Legacy Inference APIs
23+
Some older inference endpoints that have been superseded by the standardized Inference API.
24+
25+
**Migration Path:** Use the [Inference API](../api/) instead.
26+
27+
### Legacy Vector Operations
28+
Older vector database operations that have been replaced by the Vector IO API.
29+
30+
**Migration Path:** Use the [Vector IO API](../api/) instead.
31+
32+
### Legacy File Operations
33+
Older file management endpoints that have been replaced by the Files API.
34+
35+
**Migration Path:** Use the [Files API](../api/) instead.
36+
37+
## Support Timeline
38+
39+
Deprecated APIs will be supported according to the following timeline:
40+
41+
- **Current Version**: Full support with deprecation warnings
42+
- **Next Major Version**: Limited support with migration notices
43+
- **Following Major Version**: Removal of deprecated APIs
44+
45+
## Getting Help
46+
47+
If you need assistance migrating from deprecated APIs:
48+
49+
1. Check the specific migration guides for each API
50+
2. Review the [API Reference](../api/) for current alternatives
51+
3. Consult the [Community Forums](https://github.com/llamastack/llama-stack/discussions) for migration support
52+
4. Open an issue on GitHub for specific migration questions
53+
54+
## Contributing
55+
56+
If you find issues with deprecated APIs or have suggestions for improving the migration process, please contribute by:
57+
58+
1. Opening an issue describing the problem
59+
2. Submitting a pull request with improvements
60+
3. Updating migration documentation
61+
62+
For more information on contributing, see our [Contributing Guide](../contributing/).
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
---
2+
title: Experimental APIs
3+
description: APIs in development with limited support
4+
sidebar_label: Experimental
5+
sidebar_position: 1
6+
---
7+
8+
# Experimental APIs
9+
10+
This section contains APIs that are currently in development and may have limited support or stability. These APIs are available for testing and feedback but should not be used in production environments.
11+
12+
:::warning Experimental Notice
13+
These APIs are experimental and may change without notice. Use with caution and provide feedback to help improve them.
14+
:::
15+
16+
## Current Experimental APIs
17+
18+
### Batch Inference API
19+
Run inference on a dataset of inputs in batch mode for improved efficiency.
20+
21+
**Status:** In Development
22+
**Provider Support:** Limited
23+
**Use Case:** Large-scale inference operations
24+
25+
**Features:**
26+
- Batch processing of multiple inputs
27+
- Optimized resource utilization
28+
- Progress tracking and monitoring
29+
30+
### Batch Agents API
31+
Run agentic workflows on a dataset of inputs in batch mode.
32+
33+
**Status:** In Development
34+
**Provider Support:** Limited
35+
**Use Case:** Large-scale agent operations
36+
37+
**Features:**
38+
- Batch agent execution
39+
- Parallel processing capabilities
40+
- Result aggregation and analysis
41+
42+
### Synthetic Data Generation API
43+
Generate synthetic data for model development and testing.
44+
45+
**Status:** Early Development
46+
**Provider Support:** Very Limited
47+
**Use Case:** Training data augmentation
48+
49+
**Features:**
50+
- Automated data generation
51+
- Quality control mechanisms
52+
- Customizable generation parameters
53+
54+
### Batches API (OpenAI-compatible)
55+
OpenAI-compatible batch management for inference operations.
56+
57+
**Status:** In Development
58+
**Provider Support:** Limited
59+
**Use Case:** OpenAI batch processing compatibility
60+
61+
**Features:**
62+
- OpenAI batch API compatibility
63+
- Job scheduling and management
64+
- Status tracking and monitoring
65+
66+
## Getting Started with Experimental APIs
67+
68+
### Prerequisites
69+
- Llama Stack server running with experimental features enabled
70+
- Appropriate provider configurations
71+
- Understanding of API limitations
72+
73+
### Configuration
74+
Experimental APIs may require special configuration flags or provider settings. Check the specific API documentation for setup requirements.
75+
76+
### Usage Guidelines
77+
1. **Testing Only**: Use experimental APIs for testing and development only
78+
2. **Monitor Changes**: Watch for updates and breaking changes
79+
3. **Provide Feedback**: Report issues and suggest improvements
80+
4. **Backup Data**: Always backup important data when using experimental features
81+
82+
## Feedback and Contribution
83+
84+
We encourage feedback on experimental APIs to help improve them:
85+
86+
### Reporting Issues
87+
- Use GitHub issues with the "experimental" label
88+
- Include detailed error messages and reproduction steps
89+
- Specify the API version and provider being used
90+
91+
### Feature Requests
92+
- Submit feature requests through GitHub discussions
93+
- Provide use cases and expected behavior
94+
- Consider contributing implementations
95+
96+
### Testing
97+
- Test experimental APIs in your environment
98+
- Report performance issues and optimization opportunities
99+
- Share success stories and use cases
100+
101+
## Migration to Stable APIs
102+
103+
As experimental APIs mature, they will be moved to the stable API section. When this happens:
104+
105+
1. **Announcement**: We'll announce the promotion in release notes
106+
2. **Migration Guide**: Detailed migration instructions will be provided
107+
3. **Deprecation Timeline**: Experimental versions will be deprecated with notice
108+
4. **Support**: Full support will be available for stable versions
109+
110+
## Provider Support
111+
112+
Experimental APIs may have limited provider support. Check the specific API documentation for:
113+
114+
- Supported providers
115+
- Configuration requirements
116+
- Known limitations
117+
- Performance characteristics
118+
119+
## Roadmap
120+
121+
Experimental APIs are part of our ongoing development roadmap:
122+
123+
- **Q1 2024**: Batch Inference API stabilization
124+
- **Q2 2024**: Batch Agents API improvements
125+
- **Q3 2024**: Synthetic Data Generation API expansion
126+
- **Q4 2024**: Batches API full OpenAI compatibility
127+
128+
For the latest updates, follow our [GitHub releases](https://github.com/llamastack/llama-stack/releases) and [roadmap discussions](https://github.com/llamastack/llama-stack/discussions).

0 commit comments

Comments
 (0)