Repository navigation
cognichem-client 1.1.0: full /api/v1 coverage (workflows, artifacts, lookups, chat) - #3
Merged
Conversation
Adds workflows (validate, estimate, templates, node ports, runs, definitions), artifacts (list, usage, upload, manifest, record download), completion events, wallet, science lookups, the reference KG, and CogniChem Assistant chat, with sync and async twins. Covers the Python client follow-up (cognichem#269) from the agent platform epic (cognichem#458). Fixes API-key submits, which the API rejects without an Idempotency-Key: mutating calls now generate one per call. Fixes api_keys.delete raising on the 204 response. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Brings the SDK up to the current
/api/v1, covering the Python-client follow-up Cognitive-Chemistry-Labs/cognichem#269 from the agent platform epic Cognitive-Chemistry-Labs/cognichem#458. Version bumped to 1.1.0; existing 1.0 calls keep working.New resources (sync + async)
client.workflows:validate,estimate,templates/template,node_portsworkflows.runs:create,list,get,artifacts,resume,cancel,delete,wait,run(waitalso stops onpaused)workflows.definitions: CRUD, JSONdownload,share/unshare,get_shared/fork_shared,versions/get_version/restore_versionclient.artifacts:list,usage,upload(multipartcognichem_zip/raw_file),get,download(whole zip or onerecord=),delete; plus anartifact_ref(id, port)helper for$artifactbindingsclient.events(list, de-duplicating long-polllisten),client.wallet,client.lookup(PubChem, ChEMBL, Open Targets, UniProt, RCSB PDB, properties),client.reference(reference KG)client.chat(JWT only): sessions, messages, turn estimate, SSEstream/ collectedsend,stop, spend cap, proposals approve / rejectjobs.estimate, paginatedjobs.listfilters,result_artifact_idon status,inference.cancel/utils.cancel, new API key options,health()/ready()BadRequestError,PaymentRequiredError,GoneError,PayloadTooLargeError,ServerError;retryability;code= problem type slugFixes
missing-idempotency-keyfor API-key mutations without anIdempotency-Key. Mutating calls now generate one per call unless the caller passes one.api_keys.deleteraised on the API's 204 response; it now returnsNone.Other
cognichem_client.typesis now a package (same import path).scripts/sync_routes.pychecks keys and paths against backendROUTE_MAP(snapshot moved toscripts/route_map.txt).Test plan
ruff check src tests scripts examplesmypy(strict)pytest: 51 passed (respx-mocked, covering new resources, multipart upload, SSE parsing, polling, error mapping)python scripts/sync_routes.py: all 68 backendROUTE_MAProutes match; all 21 client-only paths verified against staging router decoratorshealth()/ready()against production🤖 Generated with Claude Code