fireworks2bedrock-migrate
One-shot migration of Kimi K3 inference from Fireworks to Amazon Bedrock, for Python repositories. One command scans the repository, rewrites the inference calls, and opens a pull request. The model does not change — only the backend does.
JavaScript / TypeScript repositories use the npm package instead:
npx -y fireworks2bedrock-migrate migrate --pr.
For coding agents (use this README as a skill)
This package is meant to be driven by a coding agent. When asked to "migrate this repository from Fireworks Kimi K3 to Bedrock", follow this workflow exactly and do not improvise on the parts it covers.
Step 1 — Scan
uvx fireworks2bedrock-migrate scan <repo> --json
Read the findings and bucket them:
| classification | meaning |
|---|---|
MIGRATE |
will be rewritten |
BLOCK |
left untouched (fine-tuned models, non-inference APIs, adapters, dedicated deployments) |
REVIEW |
needs a decision (runtime base_url clients, computed model IDs, raw HTTP) |
Step 2 — Migrate and open the pull request
uvx fireworks2bedrock-migrate migrate <repo> --pr --json
This creates the branch f2b/kimi-k3-bedrock, rewrites the MIGRATE files, drops in the llm_client.py helper and f2b.json routing config, adds the runtime dependencies, writes BEDROCK_MIGRATION.md, and opens the pull request.
Step 3 — Act on the exit code
| code | meaning | what to do |
|---|---|---|
0 |
migration applied (and PR opened with --pr) |
go to Step 4 |
20 |
nothing to migrate, or everything is BLOCK |
report why; edit nothing |
30 |
environment problem (dirty git tree, no origin remote) |
report the message; edit nothing |
Step 4 — Verify
The tool does not run the repository's own tests yet (checks in the JSON is reserved for that), so the agent verifies:
- Read
review_itemsfrom the JSON output — each one needs a decision before deploy. - Run the repository's own checks:
pytest -q, plus lint/type-check/build from.github/workflows/*.ymlorpyproject.toml. - Confirm the diff touches only
MIGRATEfiles plus the helper and config. - Fix only failures in the files the tool listed, then push to the branch.
Step 5 — Report
Report the pull request URL, the BLOCK items that were deliberately left alone, and any REVIEW items still needing attention.
Rules — never break these
- Never edit a file or finding the tool classified
BLOCK. - Never hand-edit a model ID; the tool and
f2b.jsonown that mapping. - Never touch infrastructure files unless the tool lists them as
REVIEW. - Do not add setup steps for the developer — one command is the whole experience.
What the migration changes
- Model ID
accounts/fireworks/models/kimi-k3→global.moonshotai.kimi-k3(us.moonshotai.kimi-k3with--us-only) OpenAI(...)/Fireworks(...)/AsyncFireworks(...)/ChatFireworks(...)→get_llm_client()/get_async_llm_client()/ChatOpenAI(model=KIMI_K3, ...)- Adds the
llm_client.pyhelper,f2b.jsonrouting config, and the runtime depsopenai+aws-bedrock-token-generator - Writes
BEDROCK_MIGRATION.md: full change log, everything left untouched, the IAM policy to attach, and rollback steps
Rollback
Set F2B_BACKEND=fireworks to route back to Fireworks with no code change.
CLI reference
fireworks2bedrock-migrate scan [path] [--json]
fireworks2bedrock-migrate migrate [path] [--pr] [--us-only] [--region <r>] [--json] [--no-git]
--prpushes the branch and opens a pull request (without it the commit stays local).--us-onlytargets theus.moonshotai.kimi-k3profile instead ofglobal..--no-gitskips branch/commit/push (for testing).
Scope
| Supported | Not supported (left as BLOCK) |
|---|---|
| Fireworks base Kimi K3 inference | fine-tuned models, LoRA adapters, dedicated deployments |
| OpenAI SDK, Fireworks SDK, LangChain, raw HTTP inference calls | fine-tuning, embeddings, datasets, batch, rerank, other non-inference APIs |
| Python repositories | other models and providers |
Metadata
Release files for fireworks2bedrock-migrate 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fireworks2bedrock_migrate-0.0.1.tar.gz | 21.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fireworks2bedrock_migrate-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.7 kB
Release files / fireworks2bedrock_migrate-0.0.1.tar.gz
| Download URL | fireworks2bedrock_migrate-0.0.1.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab93636764a8e14dd006ac8e499d4d408e42b2e55a2856dc8ceb113f0d5a8bcd
|
|
BLAKE2b-256 checksum How to use checksums |
6a80fb4bca6084892e91eefd11a466b0ff8767313a271813cfe9c0911fc84fca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / fireworks2bedrock_migrate-0.0.1-py3-none-any.whl
| Download URL | fireworks2bedrock_migrate-0.0.1-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c2f174ee1cfc74d95f69e04f632f56b1c90a9494f416f9ed7df3d89cc643f87
|
|
BLAKE2b-256 checksum How to use checksums |
b1bc8690180e35418401b4ab995b08351e10a84acf3f48e3d1d481183317f0ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|