Skip to content

Commit c2bf725

Browse files
author
Omar Abdelwahab
committed
Merge remote-tracking branch 'upstream/main' into add-mcp-authentication-param
2 parents a9bcc0a + a078f08 commit c2bf725

File tree

275 files changed

+1187
-745
lines changed

Some content is hidden

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

275 files changed

+1187
-745
lines changed

.github/workflows/python-build-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ jobs:
3131
version: 0.7.6
3232

3333
- name: Build Llama Stack API package
34-
working-directory: src/llama-stack-api
34+
working-directory: src/llama_stack_api
3535
run: uv build
3636

3737
- name: Build Llama Stack package
3838
run: uv build
3939

4040
- name: Install Llama Stack package (with api stubs from local build)
4141
run: |
42-
uv pip install --find-links src/llama-stack-api/dist dist/*.whl
42+
uv pip install --find-links src/llama_stack_api/dist dist/*.whl
4343
4444
- name: Verify Llama Stack package
4545
run: |

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ repos:
4242
hooks:
4343
- id: ruff
4444
args: [ --fix ]
45-
exclude: ^(src/llama_stack/strong_typing/.*|src/llama-stack-api/llama_stack_api/strong_typing/.*)$
45+
exclude: ^(src/llama_stack_api/strong_typing/.*)$
4646
- id: ruff-format
4747

4848
- repo: https://github.com/adamchainz/blacken-docs

pyproject.toml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ install-wheel-from-presigned = "llama_stack.cli.scripts.run:install_wheel_from_p
181181

182182
[tool.setuptools.packages.find]
183183
where = ["src"]
184-
include = ["llama_stack", "llama_stack.*", "llama-stack-api", "llama-stack-api.*"]
184+
include = ["llama_stack", "llama_stack.*", "llama_stack_api", "llama_stack_api.*"]
185185

186186
[[tool.uv.index]]
187187
name = "pytorch-cpu"
@@ -191,7 +191,7 @@ explicit = true
191191
[tool.uv.sources]
192192
torch = [{ index = "pytorch-cpu" }]
193193
torchvision = [{ index = "pytorch-cpu" }]
194-
llama-stack-api = [{ path = "src/llama-stack-api", editable = true }]
194+
llama-stack-api = [{ path = "src/llama_stack_api", editable = true }]
195195

196196
[tool.ruff]
197197
line-length = 120
@@ -258,7 +258,7 @@ unfixable = [
258258
] # Using import * is acceptable (or at least tolerated) in an __init__.py of a package API
259259

260260
[tool.mypy]
261-
mypy_path = ["src", "src/llama-stack-api"]
261+
mypy_path = ["src"]
262262
packages = ["llama_stack", "llama_stack_api"]
263263
plugins = ['pydantic.mypy']
264264
disable_error_code = []
@@ -281,14 +281,12 @@ exclude = [
281281
"^src/llama_stack/core/store/registry\\.py$",
282282
"^src/llama_stack/core/utils/exec\\.py$",
283283
"^src/llama_stack/core/utils/prompt_for_config\\.py$",
284-
# Moved to llama-stack-api but still excluded
285284
"^src/llama_stack/models/llama/llama3/interface\\.py$",
286285
"^src/llama_stack/models/llama/llama3/tokenizer\\.py$",
287286
"^src/llama_stack/models/llama/llama3/tool_utils\\.py$",
288287
"^src/llama_stack/models/llama/llama3/generation\\.py$",
289288
"^src/llama_stack/models/llama/llama3/multimodal/model\\.py$",
290289
"^src/llama_stack/models/llama/llama4/",
291-
"^src/llama-stack-api/llama_stack_api/core/telemetry/telemetry\\.py$",
292290
"^src/llama_stack/providers/inline/agents/meta_reference/",
293291
"^src/llama_stack/providers/inline/datasetio/localfs/",
294292
"^src/llama_stack/providers/inline/eval/meta_reference/eval\\.py$",
@@ -342,9 +340,7 @@ exclude = [
342340
"^src/llama_stack/providers/utils/telemetry/dataset_mixin\\.py$",
343341
"^src/llama_stack/providers/utils/telemetry/trace_protocol\\.py$",
344342
"^src/llama_stack/providers/utils/telemetry/tracing\\.py$",
345-
"^src/llama-stack-api/llama_stack_api/core/telemetry/trace_protocol\\.py$",
346-
"^src/llama-stack-api/llama_stack_api/core/telemetry/tracing\\.py$",
347-
"^src/llama-stack-api/llama_stack_api/strong_typing/auxiliary\\.py$",
343+
"^src/llama_stack_api/strong_typing/auxiliary\\.py$",
348344
"^src/llama_stack/distributions/template\\.py$",
349345
]
350346

scripts/generate_prompt_format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
from pathlib import Path
1515

1616
import fire
17-
from llama_stack_api import ModelNotFoundError
1817

1918
from llama_stack.models.llama.llama3.generation import Llama3
2019
from llama_stack.models.llama.llama4.generation import Llama4
2120
from llama_stack.models.llama.sku_list import resolve_model
21+
from llama_stack_api import ModelNotFoundError
2222

2323
THIS_DIR = Path(__file__).parent.resolve()
2424

src/llama_stack/cli/stack/_list_deps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from pathlib import Path
1010

1111
import yaml
12-
from llama_stack_api import Api
1312
from termcolor import cprint
1413

1514
from llama_stack.cli.stack.utils import ImageType
@@ -22,6 +21,7 @@
2221
from llama_stack.core.distribution import get_provider_registry
2322
from llama_stack.core.stack import replace_env_vars
2423
from llama_stack.log import get_logger
24+
from llama_stack_api import Api
2525

2626
TEMPLATES_PATH = Path(__file__).parent.parent.parent / "templates"
2727

src/llama_stack/cli/stack/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from pathlib import Path
1212

1313
import yaml
14-
from llama_stack_api import Api
1514
from termcolor import cprint
1615

1716
from llama_stack.core.datatypes import (
@@ -33,6 +32,7 @@
3332
from llama_stack.core.utils.config_dirs import DISTRIBS_BASE_DIR, EXTERNAL_PROVIDERS_DIR
3433
from llama_stack.core.utils.dynamic import instantiate_class_type
3534
from llama_stack.core.utils.image_types import LlamaStackImageType
35+
from llama_stack_api import Api
3636

3737
TEMPLATES_PATH = Path(__file__).parent.parent.parent / "distributions"
3838

src/llama_stack/core/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
import sys
88

9-
from llama_stack_api import Api
109
from pydantic import BaseModel
1110
from termcolor import cprint
1211

1312
from llama_stack.core.datatypes import BuildConfig
1413
from llama_stack.core.distribution import get_provider_registry
1514
from llama_stack.distributions.template import DistributionTemplate
1615
from llama_stack.log import get_logger
16+
from llama_stack_api import Api
1717

1818
log = get_logger(name=__name__, category="core")
1919

src/llama_stack/core/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
from typing import Any, Union, get_args, get_origin
1313

1414
import httpx
15-
from llama_stack_api import RemoteProviderConfig
1615
from pydantic import BaseModel, parse_obj_as
1716
from termcolor import cprint
1817

18+
from llama_stack_api import RemoteProviderConfig
19+
1920
_CLIENT_CLASSES = {}
2021

2122

src/llama_stack/core/configure.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
import textwrap
77
from typing import Any
88

9-
from llama_stack_api import Api, ProviderSpec
10-
119
from llama_stack.core.datatypes import (
1210
LLAMA_STACK_RUN_CONFIG_VERSION,
1311
DistributionSpec,
@@ -22,6 +20,7 @@
2220
from llama_stack.core.utils.dynamic import instantiate_class_type
2321
from llama_stack.core.utils.prompt_for_config import prompt_for_config
2422
from llama_stack.log import get_logger
23+
from llama_stack_api import Api, ProviderSpec
2524

2625
logger = get_logger(name=__name__, category="core")
2726

src/llama_stack/core/conversations/conversations.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
import time
99
from typing import Any, Literal
1010

11+
from pydantic import BaseModel, TypeAdapter
12+
13+
from llama_stack.core.datatypes import AccessRule, StackRunConfig
14+
from llama_stack.log import get_logger
15+
from llama_stack.providers.utils.sqlstore.api import ColumnDefinition, ColumnType
16+
from llama_stack.providers.utils.sqlstore.authorized_sqlstore import AuthorizedSqlStore
17+
from llama_stack.providers.utils.sqlstore.sqlstore import sqlstore_impl
1118
from llama_stack_api import (
1219
Conversation,
1320
ConversationDeletedResource,
@@ -18,13 +25,6 @@
1825
Conversations,
1926
Metadata,
2027
)
21-
from pydantic import BaseModel, TypeAdapter
22-
23-
from llama_stack.core.datatypes import AccessRule, StackRunConfig
24-
from llama_stack.log import get_logger
25-
from llama_stack.providers.utils.sqlstore.api import ColumnDefinition, ColumnType
26-
from llama_stack.providers.utils.sqlstore.authorized_sqlstore import AuthorizedSqlStore
27-
from llama_stack.providers.utils.sqlstore.sqlstore import sqlstore_impl
2828

2929
logger = get_logger(name=__name__, category="openai_conversations")
3030

0 commit comments

Comments
 (0)