Repository navigation
refactor(luma): move the provider into its upstream file layout - #433
Merged
Merged
Conversation
Split luma.rs along the files of @ai-sdk/luma (RFC-0046 §4.4):
luma/mod.rs (index.ts), luma/provider.rs (luma-provider.ts),
luma/image_model.rs (luma-image-model.ts and luma-image-settings.ts) and
luma/image_model_options.rs (luma-image-model-options.ts, was
luma/options.rs). The code is moved as is; the public paths
(`luma::{LumaImageModel, LumaProvider, LumaProviderSettings, create_luma,
luma}`) are re-exported from luma/mod.rs and unchanged. layout.toml
points at the new files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JGR3XTd9sDdXdYQV2TEyW8
…uma-into-its-upstream-layout
The boundary script (rule 10b) allows a single-modality package's providerOptions key only in its `options.rs`, the name every other such package uses, so luma/options.rs keeps its name and maps luma-image-model-options.ts. Rule 10 now lists `<name>.rs` only when the package still has one: a moved package is a directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JGR3XTd9sDdXdYQV2TEyW8
…uma-into-its-upstream-layout
…m/arcships/aimux into refactor/move-luma-into-its-upstream-layout
This was referenced Nov 1, 2026
…s' into refactor/move-luma-into-its-upstream-layout
7 of 12 tasks
…s' into refactor/move-luma-into-its-upstream-layout
cunninghamcard-bit
marked this pull request as ready for review
November 1, 2026 14:07
…s' into refactor/move-luma-into-its-upstream-layout # Conflicts: # aimux-providers/src/luma/image_model.rs
3 of 12 tasks
eric8810
approved these changes
Nov 2, 2026
eric8810
left a comment
Contributor
There was a problem hiding this comment.
move-only:image_model/provider 内容与旧 luma.rs 一致,公开导出和 30+16 tests 未变,layout 正确,CI 通过。Approve。
…s' into refactor/move-luma-into-its-upstream-layout
…uma-into-its-upstream-layout Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JGR3XTd9sDdXdYQV2TEyW8
Contributor
Author
|
approve 之后有一处改动,说明一下:#388 合并后, Generated by Claude Code |
cunninghamcard-bit
marked this pull request as draft
November 2, 2026 07:50
10 of 17 tasks
…s' into refactor/move-luma-into-its-upstream-layout # Conflicts: # aimux-providers/src/luma/image_model.rs
cunninghamcard-bit
marked this pull request as ready for review
November 5, 2026 11:26
eric8810
changed the base branch from
test/port-the-upstream-luma-tests
to
master
November 6, 2026 05:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RFC-0046 R7 的 Luma 搬移(#328)。叠在测试 PR #432 上(base 是
test/port-the-upstream-luma-tests;合并顺序 #431 → #432 → 本 PR,前一个合入后改基到 master)。按
@ai-sdk/luma的文件拆luma.rs(RFC-0046 §4.4,去掉厂商前缀):src/index.tsluma/mod.rs(模块文档、子模块、re-export)src/luma-provider.tsluma/provider.rs(LumaProviderSettings、create_luma、luma()、LumaProvider、两个 pub(crate) 常量)src/luma-image-model.ts、src/luma-image-settings.tsluma/image_model.rs(LumaImageModel、错误处理、应答 schema、轮询常量;git 认作luma.rs的改名,保留历史)src/luma-image-model-options.tsluma/options.rs(不改名:边界脚本规则 10b 只允许单模态厂商在自己的options.rs里写 providerOptions key,其他单模态厂商都用这个名字)use和模块文档的首行;没有改逻辑。luma::{LumaImageModel, LumaProvider, LumaProviderSettings, create_luma, luma}由luma/mod.rsre-export,lib.rs的pub use luma::…不动;default_providers.rs读的luma::{API_KEY_ENV_VAR, DEFAULT_BASE_URL}以pub(crate) use保留;luma::options本来就是pub(crate)。所以没有 Breaking,不需要 CHANGELOG 条目。scripts/check_provider_boundaries.sh规则 10:单模态厂商的路径表只在<name>.rs还存在时才加它(搬移后的厂商是目录,否则find报文件不存在)。refactor(deepgram): move the provider into its upstream file layout #439、refactor(fal): move the provider into its upstream file layout #443 是同一处改动,先合的那个带进 master,后合的不会冲突。layout.toml的[luma]改指新文件。src/luma/tests/(30 个)、tests/luma_image_test.rs的断言和数量与 test: port the upstream Luma tests #432 相同。docs/plan/、docs/quality-audit/里提到luma.rs的是历史记录,不改。本地跑了
scripts/check_provider_boundaries.sh(ok)和cargo fmt;没有编译。CI 在 13953c5 上全绿。Type of change
(重构:R7 目录与文件名。)
Checklist
cargo fmt --all -- --checkpassescargo clippy --workspace --all-targets -- -D warningspasses(CI,13953c52)cargo test --workspacepasses(CI,13953c52)🤖 Generated with Claude Code
https://claude.ai/code/session_01JGR3XTd9sDdXdYQV2TEyW8