fix: gemini via openrouter models (#2438)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled

* fix: gemini

* feat: let logservice log to console

* fix: log

* feat: dev-center emails
This commit is contained in:
Daniel Salazar
2026-02-08 01:42:31 -08:00
committed by GitHub
parent 4e88d28ecb
commit de7e831eff
4 changed files with 58 additions and 9 deletions
@@ -63,7 +63,7 @@ export class DDBClient {
endpoint: dynamoEndpoint,
region: 'us-west-2',
});
console.log(`DynamoDB client created with region ${await client.config.region()}`);
console.log(`Dynalite client created within instance for region: ${await client.config.region()}`);
return client;
}
@@ -81,7 +81,7 @@ export class DDBClient {
...(this.config.endpoint ? { endpoint: this.config.endpoint } : {}),
region: this.config.aws.region || 'us-west-2',
});
console.log(`Dynalite DynamoDB client created with region ${await client.config.region()}`);
console.log(`DynamoDB client created with region ${await client.config.region()}`);
return client;
}
+18 -7
View File
@@ -471,11 +471,18 @@ class LogService extends BaseService {
let logger;
if ( ! config.no_winston )
{
logger = new WinstonLogger(winston.createLogger({
levels: WINSTON_LEVELS,
transports: [
if ( ! config.no_winston ) {
const requested_level = config.logger?.level;
const winston_level = typeof requested_level === 'string'
? requested_level.toLowerCase()
: undefined;
const transports = config.toConsole
? [
new winston.transports.Console({
level: winston_level ?? 'http',
}),
]
: [
new winston.transports.DailyRotateFile({
level: 'http',
filename: `${this.log_directory}/%DATE%.log`,
@@ -497,7 +504,11 @@ class LogService extends BaseService {
maxSize: '20m',
maxFiles: '2d',
}),
],
];
logger = new WinstonLogger(winston.createLogger({
levels: WINSTON_LEVELS,
transports,
}));
}
@@ -699,4 +710,4 @@ class LogService extends BaseService {
module.exports = {
LogService,
stringify_log_entry,
};
};
+34
View File
@@ -40,6 +40,40 @@ Exciting news! <a href="https://puter.com/app/{{app_name}}">{{app_title}}</a> is
<strong>Next Step</strong>: As your app begins to gain traction with more users, we will conduct periodic reviews to assess its performance and user engagement. Once your app meets our criteria, we'll invite you to our Incentive Program. This exclusive program will allow you to earn revenue each time users open your app. So, keep an eye out for updates and stay tuned for this exciting opportunity! Make sure to share your app with your fans, friends and family to help it gain traction: <a href="https://puter.com/app/{{app_name}}">https://puter.com/app/{{app_name}}</a>
</p>
<p>Best,<br />
The Puter Team
</p>
`,
},
'listing-rejected': {
subject: 'Update needed for your app listing',
html: `
<p>Hi{{#if owner_username}} {{owner_username}}{{/if}},</p>
<p>
Thanks for submitting <strong>{{app_title}}</strong> for the Puter App Center. We reviewed your listing and need some changes before it can be approved.
</p>
<p><strong>Reason:</strong></p>
<blockquote>{{reason}}</blockquote>
<p>
Please update your listing and resubmit when ready. If you have questions, just reply to this email.
</p>
<p>Best,<br />
The Puter Team
</p>
`,
},
'listing-update-request': {
subject: 'Update request for your app listing',
html: `
<p>Hi{{#if owner_username}} {{owner_username}}{{/if}},</p>
<p>
We reviewed <strong>{{app_title}}</strong> and need some updates before it can move forward.
</p>
<p><strong>Requested updates:</strong></p>
<blockquote>{{message}}</blockquote>
<p>
Once you make the changes, please resubmit your listing request.
</p>
<p>Best,<br />
The Puter Team
</p>
@@ -227,6 +227,10 @@ export class AIChatService extends BaseService {
for ( let alias of model.aliases ) {
if ( this.#modelIdMap[alias] && this.#modelIdMap[alias] !== this.#modelIdMap[model.id] ) {
if ( providerName === 'together-ai' || providerName === 'openrouter' ) {
if ( this.#modelIdMap[alias].find(m => m.provider === 'gemini') ) {
// enable openrouter gemini for now since exposing some tools we don't
continue;
}
delete this.#modelIdMap[model.id];
exists = true;
break;