MCPcopy
hub / github.com/di-sukharev/opencommit / afterSuccess

Method afterSuccess

out/cli.cjs:28751–28759  ·  view source on GitHub ↗
(_7, response)

Source from the content-addressed store, hash-verified

28749 var HEADER_MODEL_DEPRECATION_TIMESTAMP = "x-model-deprecation-timestamp";
28750 var DeprecationWarningHook = class {
28751 afterSuccess(_7, response) {
28752 if (response.headers.has(HEADER_MODEL_DEPRECATION_TIMESTAMP)) {
28753 response.clone().json().then((body) => {
28754 const model = body.model;
28755 console.warn(`WARNING: The model ${model} is deprecated and will be removed on ${response.headers.get(HEADER_MODEL_DEPRECATION_TIMESTAMP)}. Please refer to https://docs.mistral.ai/getting-started/models/#api-versioning for more information.`);
28756 });
28757 }
28758 return response;
28759 }
28760 };
28761 exports2.DeprecationWarningHook = DeprecationWarningHook;
28762 }

Callers 1

_doMethod · 0.80

Calls 5

thenMethod · 0.80
hasMethod · 0.45
jsonMethod · 0.45
cloneMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected